I was doing research on program analysis techniques targeting runtime bloat. I have recently developed a static analysis to find objects and calls that can be pulled out of loops. One interesting warning that the tool reported for DaCapo/xalan was in method "run" of class "dacapo.xalan.XalanHarness" (in the 2006 version). At line 88 of the class, a new transformer is created by calling "_template.newTransformer()". My tool suggested to pull this call out of the while loop starting at line 83. I inspected the source code and found this was actually true, because we don't need to create a transformer per input file. When I get this call pulled out, I could see 10% running time reduction and the number of objects created was reduced by almost a million (on IBM J9 1.5.0 build 2.4). I also checked the latest version of DaCapo, and found it was still inside the loop (line 86 of class org.dacapo.xalan.XSLTBench).
I am wondering if this is indeed a performance problem, or a false warning reported by our tool. Thank you !
Log in to post a comment.