Re: Isn't it time to make libxslt multi-threaded?
Nick Wellnhofer <[email protected]> Thu, 26 Jul 2012 16:17:20 +0200
| Newsgroups | gmane.comp.gnome.lib.xslt |
|---|---|
| Message-ID | <[email protected]> |
On 26/07/2012 15:46, Дмитрий Грибов wrote: > I've attached a perl script with core logic before, you must have missed > it. Here, script is on the dropbox as well > <https://dl.dropbox.com/u/71178399/Threaded%20XSLT%20transformation.pl> now. > > If I understand the nature of XSLT processing it is, on the core logic > level, traversing over the source three. Nodes may be traversed > intependently, thanks to XSLT static semi-vatiables. So you (in the pure > spheric computer) just "fork" a new thread on each child, and parent > only waits it's return. In fact you are not forking, but giving work to > threads, but it does not change much. Yes, due to the functional nature of XSLT, xsl:for-each and xsl:apply-templates can be parallelized automatically. It would make for an interesting project, but I doubt you'll find someone who wants to implement this on top of libxslt. I think that most users of libxslt don't need lower latency for processing of a single stylesheet. You wrote that you process "a huge and dedicated xml". Do you by chance load a large XML file with the "document" function? That's the only situation where I ran into performance problems in the past, because the parsed XML file won't be cached across transformations. Nick _______________________________________________ xslt mailing list, project page http://xmlsoft.org/XSLT/ [email protected] https://mail.gnome.org/mailman/listinfo/xslt