Details
-
Test
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.3
-
None
-
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"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"
Description
I noticed that the XdocParserTest is very slow.
The first possible cause I could think of was the setup, which contains this 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(); }
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):
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
That's about 3 minutes of delay for removing a few files from the temp-directory.