On Mon, Aug 27, 2001 at 04:15:20PM +0200, Tom Schwaller wrote:
> Drew Csillag wrote:
> >
> > On Mon, Aug 27, 2001 at 11:41:08AM +0200, Tom Schwaller wrote:
> > > Tavis Rudd wrote:
> > >
> > > > All of this is true, but the final statement is unproven.
> > > > There are many factors involved and realistic benchmarks
> > > > are needed before such a statement can be made.
> > >
> > > I did some Apache benchmarks (with ab) with more ore less static pages.
> >
> > One would have to question using more or less static pages as a test of
> > an application server, but ok, we're comparing apples to apples.
> >
> > > Webware was much faster than SkunkWeb, which was a surprise (I expected
> > > the opposite). From experience I know the behaviour of Webware in the
> > > fully dynamic case, which is still better than that of SkunkWeb (and
> > > that of Zope), but I'd like to see benchmarks from other people
> > > to be shure. My standard test is
> > >
> > > ab -n 100 -c 2 http://..
> > > ab -n 1000 -c 20 http://..
> > >
> > > anybody got some numbers to share?
> >
> > Actually I'd like to see your numbers as well as the templates you
> > were running as well as hardware (especially # CPU's)/OS setup and how
> > many WebWare threads vs. SkunkWeb children. SkunkWeb 3 has not yet
> > gone through the serious beating and profiling that it's predecessors
> > have, so there is a very distinct possibility we introduced a
> > bottleneck or two, and having a benchmark is a good place to start
> > looking. The other question would be: were you going to SkunkWeb
> > directly or through Apache via mod_skunkweb?
>
> I'll try to do some simple Database examples in both setups,
> so we get more realistic examples or maybe you have a let's say MySQL
> example I can port to Webware. Tavis Rudd just posted a multiprotocoll
> App server rewrite of Webware, which is 2-33 times faster than the old
> Webware.
> Will be difficult to beat this beast. Would be interesting to see how
> your template engine works in a Webware context. Is it possible to
> use it that way or is it tied to SkunkWeb?
Oh not at all tied. In pylibs, the directory named DT contains the
main parts of the template code (why DT you ask? A temporary lack of
ingenuity in engineering a name). Some of the other tags
(e.g. <:sendmail:> <:url:>, etc.) are part of the templating service.
Actually, I've been thinking about doing a separate release of the
templating code itself.
Anyhoo, to run templates in the simple case:
#assume temp_text contains text of template
#assume that temp_path contains the path to the template
import DT
template = DT.compileTemplate(temp_text, temp_path,
DT.DTTagRegistry.get_standard_tags())
#to run it
class _dummy: pass
output_text = template({},{},_dummy())
Obviously, in the more complicated cases, you can specify more, but
in any case, yes you can use the STML engine outside of SkunkWeb. I'd
be curious to see how it performs.
One piece of info that would probably be good to know is that the
compilation step has not been tuned for speed since SkunkWeb caches
the compiled template objects, so the compilation step may be
performance drag if you are doing it for every request.
Another thing for SkunkWeb performance. You want to turn off
userModuleCleanup. If on, it clears out any modules that were loaded
during the course of processing the request, which in a development
environment is what you want since you don't want to HUP the server
every time you make a module change, but in a production environment,
it can be a significant performance hit.
Cheers,
Drew
--
print(lambda(m,d,y):['Sun','Mon','Tues','Wednes','Thurs','Fri','Satur'
][(lambda(m,d,y):(23*m/9+d+4+y/4-y/100+y/400)%7)(m<3and(m,d+y,y-1)or(
m,d+(y-2),y))])(map(int,raw_input('mm/dd/yyyy>').split('/')))+'day'
_______________________________________________
Webware-devel mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/webware-devel