[Twisted-web] Re: Good ROM tool ?
andrea at cpushare.com
Tue Jan 17 19:56:41 MST 2006
On Tue, Jan 17, 2006 at 07:14:03PM -0500, Paul G wrote:
> care to enlighten me, since i have not yet seen the pain? valentino, you're
> very welcome to chime in too. help me save me from myself ;)
I just finished porting klive from nevow to web2+Cheetah and the
homepage takes exactly half the time to render... that speaks for how
much nevow templating implementation is inefficient compared to Cheetah.
The main downside is that now it's up to me to handle the chain of
deferred, Cheetah don't speak deferreds. So I call stream.write() after
each block-rendering is finished. I'm using #block blockname #end block
for that, so I load the template only once at the first invocation of
render(req) and then I fill it over time when the deferred fires. The
bonus is that the templates are now smaller than with nevow because
Cheetah is a lot more flexible than nevow. Perhaps in the future we can
teach Cheetah how to handle deferreds.
I'm going to keep testing KLive on web2 for a while (web2 is already
online, so we also test if web2 from trunk is going well, the traffic on
klive site is reasonable).
Then once there is an agreement that the API of web2 is remotely stable,
I'll start porting CPUShare on top of web2 as well. In the meantime I'll
leave CPUShare on top of nevow in a freezed-obsolete state, the web side
is the least interesting part of CPUShare anyway, and I want to finish
the network protocol before rewriting all forms and templates with
Note: I'm fine to break the web2 API over time, I'm fine to change API
for good reasons, but breaking an API is quite different from obsoleting
an whole subsystem (like formless/atop). Obsoleting whole subsystems is
what requires deep rewrites, breaking apis often is fine thing to handle
and I'm very ready to handle it (or I wouldn't be porting on top of
With web2 I still have to fixup the log (it stopped loggin) and the
revese proxy (including peer information forwarding, something I added
to twisted.web but not to twisted.web2 yet). So I'll do that next.
More information about the Twisted-web