ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 50843] New: DateFormat.getDateTimeInstance() is very expensive, we can cache it to improve performance
Date Tue, 01 Mar 2011 02:31:30 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=50843

           Summary: DateFormat.getDateTimeInstance() is very expensive, we
                    can cache it to improve performance
           Product: Ant
           Version: 1.8.2
          Platform: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core
        AssignedTo: notifications@ant.apache.org
        ReportedBy: xiaoming@cs.wisc.edu


DateFormat.getDateTimeInstance() is very expensive, we can cache it to improve
performance. In the files:

./apache-ant-1.8.2/src/main/org/apache/tools/ant/taskdefs/Touch.java line:75
./apache-ant-1.8.2/src/main/org/apache/tools/ant/types/resources/selectors/Date.java
 line: 141

DateFormat.getDateTimeInstance() is called in the critical section. We can
cache the result by adding a class member field. It can help reduce the work in
the critical section, and we only need to create the instance once.

This is similar to the Apache Bug 48778
https://issues.apache.org/bugzilla/show_bug.cgi?id=48778

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

Mime
View raw message