It depends a lot on what kind of patterns you have in the stylesheet as to
whether or not you'll see an incremental effect. From the sound of it, you
should be seeing incremental processing, at least to some extent.
When the second transformer gets a startDocument event from the first
transformer, it launches a new transformer thread, which then processes
what it can until it finds a node that has not yet arrived. However, and
what may be happening, is that a sort of race condition occurs with the
threads. This has several problems that I don't want to go into right now.
With the DTM work we're doing (DTM_EXP branch), we instead "throttle" back
and fourth between the threads... i.e. we don't let the SAX event producer
thread run concurrently with the transformer thread. This will give much
more predictable results. Also, when we're running with the Xerces parser,
we use their parseMore() function so we don't have to run two threads at
all. Eventually we hope to set up a pure pull pipeline that does not use
threads at all.
I hope this explains things well enough for your purposes for the short
term.
-scott
Claudio
Sacerdoti To: [EMAIL PROTECTED]
Coen cc: (bcc: Scott Boag/CAM/Lotus)
<sacerdot@CS. Subject: Stylesheet chains & parallel
threads
UniBO.IT>
06/07/2001
11:58 AM
Please
respond to
xalan-dev
Hi,
can someone briefly explain me what happens when I chain together
many stylesheet applications using SAX? I understand that a thread
is created for every stylesheet. What I don't understand (well,
I have not dived into the code) is: can the second stylesheet
really start processing before the first one completes?
It doesn't seem so (at least, looking at my benchmarks). Though,
my stylesheets proceed absolutely in a top-down way and it seems
perfectly reasonable to have a real pipeline of processors working
each one on the node just created.
Thanks in advance for any explanation.
Cheers,
C.S.C.
--
----------------------------------------------------------------
Real name: Claudio Sacerdoti Coen
PhD Student in Computer Science at University of Bologna
E-mail: [EMAIL PROTECTED]
http://caristudenti.cs.unibo.it/~sacerdot
----------------------------------------------------------------