Closed krosenvold closed 15 years ago
After getting some more experience with this patch I feel quite certain that the suggested solution to B should not be used, because it changes the contract between the ParentRunner and its children too much - without sufficient value. The (minor) patch to the Description class still has a large effect
I reworked patch B, which can now be found at branch perftune2 instead, repo git://github.com/krosenvold/junit.git
Running with a profiler revealed that 70-80% of the execution time of junit 4.7 is spent with the "getDescription" hierarchy. The patch basically does 2 things: A) Replaces the use of String.format with stringbuilder B) Caches descriptions in the ParentRunner
Change B actually modifies the API between parent-runners and their subclasses slightly, which may/may not be a good idea. (I see alternate ways of doing this that do not have this direct side effect)
There is no specific test for this improvement, since it is covered by other tests. Please be warned that the branch "speedImprovement" at git@github.com:krosenvold/junit.git also contains the two concurrency patches I have submitted.