DO NOT REPLY [Bug 33513] New: - Unnecessary string object allocation in ConstantPoolGen

[email protected]
Newsgroups gmane.comp.jakarta.bcel.devel
Message-ID <[email protected]>
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=33513>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=33513

           Summary: Unnecessary string object allocation in ConstantPoolGen
           Product: BCEL
           Version: unspecified
          Platform: PC
               URL: http://www.helsinki.fi/~pohjalai/BCEL-patch.diff
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Main
        AssignedTo: [email protected]
        ReportedBy: [email protected]


I was writing software that uses the BCEL library. Having performance
problems, I found out that generic/ConstantPoolGen.java does unnecessary
StringBuffer expansion: in two cases the length of the resulting string is
known beforehand, but the created StringBuffer is not given a starting
length for the internal buffer.

With the attached patch applied, the running time of my application
decreased from 1 min 45 seconds to 1 min 30 seconds as the generation of
new constant pools was faster.

(However, by rewriting my algorithm to do less constant pool
instantiations, the running time dropped to 25 seconds).

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.