[Twisted-web] Re: Good ROM tool ?
andrea at cpushare.com
Wed Jan 18 17:02:52 MST 2006
On Wed, Jan 18, 2006 at 05:58:26PM -0500, Paul G wrote:
> all changes to mutable objects are, afaik, synchronized by the gil (global
> interpreter lock - think the BKL, andrea ;), so we're synchronizing very
> heavily anyway. i'm going to benchmark running it synzhronously (with
> precompiled/preloaded templates) and running it as a separate process,
> with pb or shm for io.
Note that my deferreds aren't the ones invoking Cheetah. My deferreds
return data on disk (or kernel cache), and this data will fill the
Cheetah templates. I render synchronously (I'm not using a pool of
threads to render Cheetah). What I do is to get the data from the db
async, but the rendering is sync.
So the idea is that the db query will return a deferred, I'd like to do
t = Template('$something')
t.something = self.sql.query() # will return a deferred
And I'd like Cheetah to interact with web2 stream write automatically.
What I do right now is to render different blocks of the template by
hand, as soon as the deferred fires, I use multiple stream.write by
hand. This way the page remains nicely interactive, but it's not
automatic like it was with nevow. Nevow understood deferred, Cheetah
More information about the Twisted-web