https://issues.apache.org/bugzilla/show_bug.cgi?id=45651

           Summary: Enhance performance of Project.fireMessageLoggedEvent
           Product: Ant
           Version: unspecified
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]


Created an attachment (id=22454)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=22454)
Source of the simple benchmark I did to compare iterations

When running a big build under a profiler, I notice that 7% of the time of my
build is spent in the method Project.fireMessageLoggedEvent, even when tracing
is disabled.

This method actually loop on a Vector of listener every time a debug call is
done.

Using an other data structure to store the listeners would be much more
performant.

I benchmarked looping on a Vector, on an ArrayList and a native array and the
result on an ibm 1.5 jvm is :

Vector loop ellapsed time (ms): 255.917905
ArrayList loop ellapsed time (ms): 136.867966
Native array loop ellapsed time (ms): 10.323511  (there is probably also a gain
for the gc)

So storing the list of listeners directly in a native array would boost this
method by a factor 20.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Reply via email to