* luke saunders <[EMAIL PROTECTED]> [2006-06-18 00:35]: > > I've actually been trying to work out a patch for this that > > spawns off a new thread. I've been using subrequest for a > > quasi portal like approach to building my site and I find > > that performance suffers when there are too many subrequests. > > Wouldn't spawning a new thread make it slower? Since the > calling thread still needs to wait for the spawned thread to > return.
I assume the idea is that the calling *wouldn’t* wait – instead it’d go ahead and spawn more subrequests in their own threads each, and then it’d wait at the end to collect all the results. The total overhead would be greater, but if you had multiple CPUs to run this on, then all of them could contribute to the processing, so the throughput could be higher despite the extra overhead. That said, I’m pretty sure this approach would add a lot greater complexity to the code than could be justified by the gains. I’d rather profile Catalyst and try to speed up subrequests. That would yield much more broadly applicable results, too. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/> _______________________________________________ List: [email protected] Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[email protected]/ Dev site: http://dev.catalyst.perl.org/
