Slow Transformation Scenarios in Projects
Posted: Thu Dec 07, 2017 6:35 pm
Hi all --
When we are working with oXygen Projects and tranforming large directories of files, we seem to be running into a slowdown, especially versus running saxon9he from the command line. This occurs on multiple OSs -- MacOS X, Ubuntu, and FreeBSD. I haven't had an opportunity to test this on Windows.
For example, a directory of 154 files takes almost a minute, while running from the command line takes about 4.5 seconds. It would be nice to have a better understanding of how to make the project execute the transform faster. The transform being applied in both cases is a simple, minimal identity transform.
Is there an option to apply a transformation against a directory, as with the saxon on the command line?
Here is the transform:
Here is the project file -- I have stored the transformation scenario in the project:
Here's the command line:
I've checked the transformation scenario for the project and I'm not showing any results, as I know that can cause some slow behavior. This example was ~150 files, but we will sometimes transform several thousand files.
Thanks for your time.
When we are working with oXygen Projects and tranforming large directories of files, we seem to be running into a slowdown, especially versus running saxon9he from the command line. This occurs on multiple OSs -- MacOS X, Ubuntu, and FreeBSD. I haven't had an opportunity to test this on Windows.
For example, a directory of 154 files takes almost a minute, while running from the command line takes about 4.5 seconds. It would be nice to have a better understanding of how to make the project execute the transform faster. The transform being applied in both cases is a simple, minimal identity transform.
Is there an option to apply a transformation against a directory, as with the saxon on the command line?
Here is the transform:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="xs"
version="2.0">
<!-- basic identity transform -->
<xsl:output method="xml" indent="yes" encoding="UTF-8"/>
<xsl:strip-space elements="*"/>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<project version="19.1">
<meta>
<filters directoryPatterns="" filePatterns="proj-test.xpr" positiveFilePatterns="" showHiddenFiles="false"/>
<options>
<serialized version="19.1" xml:space="preserve">
<serializableOrderedMap>
<entry>
<String>scenario.associations</String>
<scenarioAssociation-array>
<scenarioAssociation>
<field name="url">
<String>sample-mods-154/</String>
</field>
<field name="scenarioIds">
<list>
<String>sample-mods-154-proj</String>
</list>
</field>
<field name="scenarioTypes">
<list>
<String>XSL</String>
</list>
</field>
</scenarioAssociation>
</scenarioAssociation-array>
</entry>
<entry>
<String>scenarios</String>
<scenario-array>
<scenario>
<field name="advancedOptionsMap">
<null/>
</field>
<field name="name">
<String>sample-mods-154-proj</String>
</field>
<field name="baseURL">
<String></String>
</field>
<field name="footerURL">
<String></String>
</field>
<field name="fOPMethod">
<String>pdf</String>
</field>
<field name="fOProcessorName">
<String>Apache FOP</String>
</field>
<field name="headerURL">
<String></String>
</field>
<field name="inputXSLURL">
<String>file:/home/bridger/Documents/xslt-stuff/oxygen-project-test/basic-identity-transform.xsl</String>
</field>
<field name="inputXMLURL">
<String>${currentFileURL}</String>
</field>
<field name="defaultScenario">
<Boolean>false</Boolean>
</field>
<field name="isFOPPerforming">
<Boolean>false</Boolean>
</field>
<field name="type">
<String>XSL</String>
</field>
<field name="saveAs">
<Boolean>true</Boolean>
</field>
<field name="openInBrowser">
<Boolean>false</Boolean>
</field>
<field name="outputFile">
<File>${pd}/sample-mods-154-out-proj/${cfne}</File>
</field>
<field name="outputResource">
<String>${pd}/sample-mods-154-out-proj/${cfne}</String>
</field>
<field name="openOtherLocationInBrowser">
<Boolean>false</Boolean>
</field>
<field name="locationToOpenInBrowserURL">
<null/>
</field>
<field name="openInEditor">
<Boolean>false</Boolean>
</field>
<field name="showInHTMLPane">
<Boolean>false</Boolean>
</field>
<field name="showInXMLPane">
<Boolean>false</Boolean>
</field>
<field name="showInSVGPane">
<Boolean>false</Boolean>
</field>
<field name="showInResultSetPane">
<Boolean>false</Boolean>
</field>
<field name="useXSLTInput">
<Boolean>true</Boolean>
</field>
<field name="xsltParams">
<list/>
</field>
<field name="cascadingStylesheets">
<String-array/>
</field>
<field name="xslTransformer">
<String>Saxon-HE</String>
</field>
<field name="extensionURLs">
<String-array/>
</field>
</scenario>
</scenario-array>
</entry>
</serializableOrderedMap>
</serialized>
</options>
</meta>
<projectTree name="proj-test.xpr">
<folder path="."/>
</projectTree>
</project>
Code: Select all
java -jar /home/bridger/src/saxonHE/saxon9he.jar -s:oxygen-project-test/sample-mods-154 -xsl:oxygen-project-test/basic-identity-transform.xsl -o:oxygen-project-test/sample-mods-154-out
Thanks for your time.