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: | Huge performance regression compiling java module suite | ||
---|---|---|---|
Product: | apisupport | Reporter: | anba <anba> |
Component: | Harness | Assignee: | Jaroslav Tulach <jtulach> |
Status: | VERIFIED FIXED | ||
Severity: | normal | CC: | anebuzelsky, converginglight, dlipin, jglick, musilt2, rbalada |
Priority: | P3 | Keywords: | PERFORMANCE |
Version: | 6.x | ||
Hardware: | PC | ||
OS: | Linux | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
6.8 verbose output of clean and build of FR sample
6.9 verbose output of clean and build of FR sample |
Description
anba
2010-06-02 08:19:05 UTC
Need to investigate ASAP. Reassigning to apisupport. Note that performance test results show slight difference between 6.8 and 6.9 in build time for J2SE project. However, given the relatively small difference (5-10% regression) those results may not be indicating anything real. From previous experience with Netbeans nightly trunks versus releases I can say: nighties are slower when it comes to building projects. Can someone else confirm this? Is it because of some debugging information, loggers, etc... ? Cannot be related to harness changes? Can reproduce, building feedreader in 6.8 ~5sec, while in 6.9 ~15 sec. Created attachment 99898 [details]
6.8 verbose output of clean and build of FR sample
Created attachment 99899 [details]
6.9 verbose output of clean and build of FR sample
Can reproduce running clean target on SQE suite. -J-da improves things, which I can fix in the Ant module: core-main #425435f4b943. (No need to backport, since release builds do not use assertions.) Even with that, performance seems cca. 2x slower when using the 6.9 harness than when using the 6.8 harness. You can select which harness to use for a given NB platform version, so there is no regression in the IDE as such and there is a simple workaround. Change from 6.8 to 6.9 harness reproducible running Ant from the command line. There is a bit of slowdown caused by config/ModuleAutoDeps/*.xml processing, but most of the slowdown seems to come from config/Modules/*.xml parsing (incl. XPath) to support OSGi bundle clusters (jtulach's 4f0b3ab8033d). The following restores most of 6.8's speed: diff --git a/nbbuild/antsrc/org/netbeans/nbbuild/ModuleListParser.java b/nbbuild/antsrc/org/netbeans/nbbuild/ModuleListParser.java --- a/nbbuild/antsrc/org/netbeans/nbbuild/ModuleListParser.java +++ b/nbbuild/antsrc/org/netbeans/nbbuild/ModuleListParser.java @@ -584,6 +584,9 @@ if (!fileName.endsWith(".xml")) { continue; } + if (entries.containsKey(fileName.substring(0, fileName.length() - 4).replace('-', '.'))) { + continue; + } try { if (expr == null) { expr = XPathFactory.newInstance().newXPath().compile("/module/param[@name='jar']"); Assigning to author to review. Integrated into 'main-golden', will be available in build *201006100001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/425435f4b943 User: Jesse Glick <jglick@netbeans.org> Log: #187071: Ant execution noticeably slower with assertions enabled. Any opinion on the proposed patch? If it seems safe and effective, I would suggest it be a 6.9.1_CANDIDATE. (Despite the existence of a workaround - use an older harness - the 6.9 performance regression might merit a P2 for this issue; not sure.) Looks reasonable. Applied as core-main#2a6d68c9e941 Please verify bugfix for this bug, so it can be included in release691 repository. Thanks, -R Integrated into 'main-golden', will be available in build *201006170001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/2a6d68c9e941 User: Jesse Glick <jglick@netbeans.org> Log: #187071: Skipping parsing of config/Modules/*.xml if appropriate module JAR seems to exist in regular locations verified main #2a6d68c9e941 transplanted to release691 #2d0a8ffafc64 main #425435f4b943 transplanted to release691 #b7def3359d4d |