Re: Isn't it time to make libxslt multi-threaded?
Дмитрий Грибов <[email protected]> Thu, 26 Jul 2012 17:46:15 +0400
| Newsgroups | gmane.comp.gnome.lib.xslt |
|---|---|
| Message-ID | <CAE+B=x=1MupEpFjANt7+_y=ewftSHNia9MFy3T7JTymhsCdbQQ@mail.gmail.com> |
On Thu, Jul 26, 2012 at 5:36 PM, Stefan Behnel <[email protected]> wrote: > Just to get this discussion back on track, where would you apply threading > in libxslt? An answer to that, as well as an implementation, may not be as > trivial as you seem to think. Also, it would at least require some kind of > scheduling mechanism in order to distribute jobs (such as matching nodes or > called templates) over the threads. > > One of the obvious approaches would be a map-reduce pattern. That would fit > very well with the functional and hierarchical nature of XSLT and XML in > general. > > 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. _______________________________________________ xslt mailing list, project page http://xmlsoft.org/XSLT/ [email protected] https://mail.gnome.org/mailman/listinfo/xslt