RE: [Templates] processing template chunks in parallel
[prev]
[thread]
[next]
[Date index for 2005/03/08]
> It would all be much simpler if step 1 was that your code looks at some
> kind of user preferences data to see what should be on the page, and TT
> didn't enter the picture until step 4. That would also let you build
> clean code for generating the content data, which could make smart use
> of caching for things like your "geo" data. It would be an ordinary
> forking and IPC programming exercise.
[Cahill, Earl]
Perhaps I could put two tags on the top of the page. One that given a user,
returned my array of hash refs for what is needed on the page, like the user
preferences you mention. A second that takes my structure and handles all
the forking, priorities and the like, populating as it went. Then I don't
need to wait for the whole page to get parsed before I can start.
I think this would allow me to handle everything in just a plugin. Thanks
for the feedback. Anything out there to help with the forking part?
The only drawback is it means you need to know what needs to be done for the
page at the start of the page.
> You'd be very lucky if that turns out to be true, but it could be close
> if these tasks are mostly just waiting on I/O from some other source.
[Cahill, Earl]
Yeah, I guess I am thinking of remote calls, where the local box is largely
just waiting for the remote call to return with likely a "small" amount of
data that wouldn't come close to filling the network. So I guess my
thinking is that so long as the remote box can handle the requests pretty
well in parallel, ten one second requests taking about one second is
possible.
> Incidentally, sites like my.yahoo.com do all of this ahead of time and
> just do includes of the cached content when you hit the server. And
> my.yahoo.com makes heavy use of Perl.
[Cahill, Earl]
I could certainly add a level of caching in my scheme.
Thanks,
Earl
_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates
 |
 |
RE: [Templates] processing template chunks in parallel
Cahill, Earl 18:12 on 08 Mar 2005
|