This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | EditableProperties is slow | ||
---|---|---|---|
Product: | projects | Reporter: | Torbjorn Norbye <tor> |
Component: | Ant Project | Assignee: | Jesse Glick <jglick> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | CC: | issues, tboudreau |
Priority: | P2 | Keywords: | PERFORMANCE |
Version: | 4.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
Torbjorn Norbye
2005-09-13 05:51:08 UTC
OK, copy constructor performance should be fixable, and I will take a look at why sorting is always on - probably a mistake at some point. BTW, profiler shows EditableProperties.load() as a hotspot (2.5% time) during startup with all netbeans projects open. It would be very nice to have this method optimized. It's true that the default constructor is supposed to not sort, according to its Javadoc. In fact it never behaved this way! I will fix it to behave according to the Javadoc, but update clients to request sorting anyway. I will change the copy constructor to do a raw deep copy of fields rather than inserting keys one by one. Should be faster. cloneProperties() is called whenever you retrieve or store EP instances via AntProjectHelper, for safety reasons, so this should improve project load time. (If it needs to be improved more, it would be possible to use a copy-on-write strategy, but that would be more work to do.) Will also use a linked list for the items, which ought to make add operations run faster. Don't know if I can speed up load(InputStream). Maybe, if it is found to be doing something wasteful. Updating clients to explicitly ask for alphabetization: committed * Up-To-Date 1.14 ant/project/src/org/netbeans/spi/project/support/ant/GeneratedFilesHelper.java committed * Up-To-Date 1.12 apisupport/project/src/org/netbeans/modules/apisupport/project/suite/BrandingSupport.java committed * Up-To-Date 1.11 apisupport/project/src/org/netbeans/modules/apisupport/project/universe/LocalizedBundleInfo.java committed * Up-To-Date 1.8 j2ee/blueprints/src/org/netbeans/modules/j2ee/blueprints/ui/projects/J2eeSampleProjectGenerator.java committed * Up-To-Date 1.92 web/project/src/org/netbeans/modules/web/project/WebProject.java committed * Up-To-Date 1.6 web/project/src/org/netbeans/modules/web/project/api/WebProjectUtilities.java Fixing default constructor, and implementing described performance improvements: committed * Up-To-Date 1.14 ant/project/src/org/netbeans/spi/project/support/ant/EditableProperties.java committed * Up-To-Date 1.13 ant/project/test/unit/src/org/netbeans/spi/project/support/ant/EditablePropertiesTest.java Tor, verification would be appreciated, and feel free to open additional bugs w/ patches if possible for any other problems you find. *** Bug 155856 has been marked as a duplicate of this bug. *** |