John Bailey wrote:
I have been running the tests through JProfiler. Not sure if I just
have not optimized the profilers settings, but I am getting numbers all over the board,
and some are well over double the time of a JUnit execution. The non-profiler time to run
the test seems to be <300ms.
With the profiler enable, I can see ~30% of the total time is in the VFS.mountZip call.
With >10% of the total test time taken up by the 5,085 calls to
org.jboss.vfs.util.PathTokenizer.getTokens.
The org.jboss.classloading.plugins.vfs.PackageVisitor.determineAllPackages call is taking
~35% of the total test time to run. With ~14% of the total test time in
VirutalFile.isDirectory.
Ya, JProfiler is all over the place for me too.
I did currentTimeMillis() timing VFS init took 179/252ms if I don't do
children recursive mount. 420/456ms if I do do recursive child mount.
(Maybe children are getting initialized/cached or something with the
recursive child mount).
Maybe there is room for more caching of this isDirectory like calls.
There may be a problem with caching the info as the actual file system can change for a
given VirutalFile, and the cached information is not guaranteed to remain accurate.
Should be fine to cache for a jar? VirtualFile could ask the FileSystem
if its cacheable or not.
Or, even better, you could have parallel non-cached getters that could
be used by sensitive logic (like a deploy/ directory scanner). If a
non-cached getter detects a new value, it invalidates the entire cache.
i.e.
Bill
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com