Saxon in ANT slow "sometimes"
Added by Bob Stuart over 10 years ago
I am modifying ~400 HTML files in ant using Saxon 9.1.0.6J. When I run the task alone it's ~10x faster than when it's run as part of a larger build process that takes ~2 hours. The larger build does invoke this task and many other xslt type tasks.
The task alone show the xslt task taking ~16 seconds run alone, when it's part of the larger build it tends towards 185 seconds. The timing number are based on the output of doing ant -logger org.apache.tools.ant.listener.ProfileLogger TaskXXX and looking at the values for the xslt task Example xslt: finished Wed Jun 18 01:45:06 EDT 2014 (185725ms)
My Java and ANT options lead me to believe it's not memory starved JAVA_OPTS=-Xms256m -Xmx8192m -XX:ReservedCodeCacheSize=128M ANT_OPTS=-Xms1024m -Xmx8192m -XX:MaxPermSize=1024M
I'm kind of stumped as to why there is the difference in run times.
I'm putting what I think are the relevant pieces of the ant file here
Replies (1)
RE: Saxon in ANT slow "sometimes" - Added by Michael Kay over 10 years ago
I would look hard at whether there is any web traffic associated with those XHTML DTDs. Although the main DTDs are listed in your catalog and redirected to local files, these possibly contain links to other external entities which are being fetched from the W3C site. (Recent Saxon releases will resolve these DTDs internally and may do a better job than your catalog resolver. However, you're using 9.1 so that doesn't apply.)
Please register to reply