[ https://jira.codehaus.org/browse/DOXIA-487?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Scholte closed DOXIA-487. -------------------------------- Resolution: Fixed Fix Version/s: 1.4 Assignee: Robert Scholte Fixed in [r1463123|http://svn.apache.org/r1463123] > Speed up XdocParserTest.setup > ----------------------------- > > Key: DOXIA-487 > URL: https://jira.codehaus.org/browse/DOXIA-487 > Project: Maven Doxia > Issue Type: Test > Components: Module - Xdoc > Affects Versions: 1.3 > Environment: Apache Maven 3.0.5 > (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 14:51:28+0100) > Maven home: D:\apache-maven-3.0.5\bin\.. > Java version: 1.6.0_25, vendor: Sun Microsystems Inc. > Java home: C:\Program Files\Java\jdk1.6.0_25\jre > Default locale: nl_NL, platform encoding: Cp1252 > OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows" > Reporter: Robert Scholte > Assignee: Robert Scholte > Fix For: 1.4 > > > I noticed that the XdocParserTest is very slow. > The first possible cause I could think of was the setup, which contains this > code: > {code} > // AbstractXmlParser.CachedFileEntityResolver downloads DTD/XSD files in > ${java.io.tmpdir} > // Be sure to delete them > String tmpDir = System.getProperty( "java.io.tmpdir" ); > String excludes = "xdoc-*.xsd, xml.xsd"; > List<String> tmpFiles = FileUtils.getFileNames( new File( tmpDir ), > excludes, null, true ); > for ( Iterator<String> it = tmpFiles.iterator(); it.hasNext(); ) > { > File tmpFile = new File( it.next().toString() ); > tmpFile.delete(); > } > {code} > These are my benchmark numbers in ms for this piece of code when running 1 > test (so these is the time spent per test method for setup only): > {noformat} > setup: 61866 > setup: 9530 > setup: 9130 > setup: 9255 > setup: 9770 > setup: 9300 > setup: 9391 > setup: 9352 > setup: 9170 > setup: 9167 > setup: 9088 > setup: 9214 > setup: 9508 > setup: 9161 > setup: 9426 > setup: 10308 > setup: 9952 > setup: 10491 > {noformat} > That's about 3 minutes of delay for removing a few files from the > temp-directory. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira