Thanks for trying this out.

I think the first thing to establish is whether the facility is actually being activated. Start by checking that the -explain output shows the for-each instruction with the relevant number of threads. If not, the chances are you're running Saxon-HE code for some reason (e.g. license file not found).

The suggestion of making the attribute an AVT is a good one.

Michael Kay
Saxonica

On 25/11/2010 08:37, Jirka Kosek wrote:
Hi,

I have large transformation which loads 140 MB of XML and then produces
around 40000 heavily hyperlinked HTML pages (around 250 MB of total size).

I though that new feature saxon:threads
(http://saxonica.com/documentation/extensions/attributes/threads.xml)
could speed up process by generating respective output files in parallel.

However my first benchmarks shows rather opposite then speed up. I don't
know whether I'm doing something wrong or whether in this case
saxon:threads couldn't work effectively.

I have dual core processor, however even when I specify
saxon:threads="2" CPU load on respective java process never goes over
50%. There could be many reasons for this and it would take long time to
rule out each reason by separate benchmark, so any hint is welcomed.

Should saxon:threads work with standard Java SE (1.6) on Windows or it
is necessary to change JVM configuration to utilize multiple cores?

Could Saxon process xsl:result-document in parallel or is this blocking
instruction so saxon:threads couldn't improve speed there?

My code uses extension instructions for localization. Could this affect
threading possibility? (Extension is just using ResourceBundle, so
hopefully this class is not blocking itself.)

Of course it could be that my harddisk (it is in laptop) is too slow to
write data quick enough. But if this is case, it would be strange to see
java load at almost constant rate 49-50%. Sometimes it drops down
rapidly for a few seconds -- I don't know if this because GC -- I have
assigned 1 GB memory to Java (-Xmx and -Xms) and transformation requires
around 900 MB so in theory there shouldn't be need for invoking GC.

I simply curious if saxon:threads could help here. Current experience is
that sometimes transformation finished and it tooks ~20% longer then
without threading. Sometimes transformation gets frozen and java process
uitlizes 50% of CPU (one core). Probably deadlock on I/O operations?

Thanks in advance,

				Jirka

P.S. Would it be to hard to support AVT in saxon:threads? It would allow
to pass number of cores as XSLT parameter.


------------------------------------------------------------------------------ Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! Tap into the largest installed PC base & get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________ saxon-help mailing list archived at http://saxon.markmail.org/ saxon-help@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/saxon-help