ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 19101] New: - Project.fireMessageLoggedEvent performance fix
Date Thu, 17 Apr 2003 02:12:44 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19101>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19101

Project.fireMessageLoggedEvent performance fix

           Summary: Project.fireMessageLoggedEvent performance fix
           Product: Ant
           Version: 1.5.3
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: Minor
          Priority: Other
         Component: Core
        AssignedTo: dev@ant.apache.org
        ReportedBy: smagoun@mac.com


In trying to speed up my builds, I ran ant with the -Xprof option to see what
what slow. According to the profiler, an inordinate amount of time was being
spent in Vector.size(). The profiler also showed that
Project.fireMessageLoggedEvent() was chewing up a lot of time, so I started
looking there.

It turns out a simple optimization sped up my build from 1:45 to 1:30 (about
15%). The optimization is to pull the call to listeners.size() out of the loop.

Mime
View raw message