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.
Startup with ergonomics enabled should be comparable to the lighter editions (PHP,J2SE) of NB. Currently it startup_time-wise doesn't make much difference whether it is on or off.
Petře, could you please generate comparition of both starts so we know what part is slower? I have NPS files for both starts, but they are hard to orient in.
Created attachment 113403 [details] Startup visualization Startup visualization of full, ergonomics and J2SE build on Windows. It is a cold start with opened AnagramGame.
ergonomics#0feed2ea1ed1
Petr, please verify ... we will backport the fix into release71
This fix only fixes Issue #205436 but does nothing for this issue
Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/0feed2ea1ed1 User: Jaroslav Tulach <jtulach@netbeans.org> Log: #204513: At least 500ms on cold disk has been waisted by initializing the listener on config/Modules directory. Do it in background.
The changeset from comment #3 is not fix for this bug but for Issue #205436. Jarda is still investigating ways to fix this regression -> removing 71_HR_FIX_CANDIDATE keyword
Integrated into 'releases' Changeset: http://hg.netbeans.org/releases/rev/20f312c843ed User: Jaroslav Tulach <jtulach@netbeans.org> Log: #204513: At least 500ms on cold disk has been waisted by initializing the listener on config/Modules directory. Do it in background.
Created attachment 113560 [details] Comparing classes loaded on 2nd start (no project) between ergonomics and java edition As far as I can tell, the Java edition has been optimized quite a lot. It loads only debugger related classes and few java project/platform related ones. It is hard for ergonomics to be faster (especially when it needs to process three times more modules, in spite they are disabled).
With recent enhancements in startup and considering the big problem seems to be only with cold startup, not the warm one, priority can be lowered to P3.
As most of the slowness is caused by processing most of the available (and disabled) modules, I'd like to cache the previous call to enabled(...) and remember the order of modules and their dependencies, so next time I can set up everything without parsing manifests at all.
Created attachment 115374 [details] Persisting modules between restarts I'd like to eliminate parsing of manifests and possibly also computation of module dependencies on subsequent starts. This is the first attempt.
If you are using ModuleHistory for something again, delete the comment at its head. Use NbCollections to avoid unchecked warnings as for (Map<File,Module>) mm.readObjectInScope(...). Beware of package dependencies, which could suddenly fail to be satisfied just because you used a different --jdkhome. Probably need to be explicitly rechecked on each startup even if using cache. readObjectInScope could take a type parameter for clarity, though it would be called with Object anyway. Change to signature of SpecificationVersion technically requires API_REVIEW_FAST.
I am starting new attempt with a test to prevent parsing on start and removal of old manifests cache: http://hg.netbeans.org/ergonomics/rev/CacheModuleState204513
Here are some measurements as of dd5b0c02d3d3. Warm ergonomics start: Old: Window system shown @3371, @3193, @3220, @3275, @3362 => Avg. of 3 = 3285 ms New: Window system shown@2966, @3045, @2938, @3002, @2949 => Avg. of 3 = 2972 ms That would mean about 10% speed up in warm ergonomics start against previous version. Comparing warm start of new ergonomics vs. new full build without ergonomics: full: @4271, @4218. @4359, @4440, @4454 => Avg. of 3 = 4356 ms That means ergonomics are after by 30% than build without ergonomics in this case. Comparing cold start of ergonomics (8s) vs. cold start of full build (9.6s) does not make thta big difference, yet ergonomics is faster. By 15-20%. Warm start of Java SE edition is: @3549, @3479, @3599, @3558, @3526 => Avg of 3 = 3540ms this means that on warm start empty ergonomics are 17% faster than Java SE. Cold start of Java SE was about 8.6s which makes ergonomics slightly (about 5%) faster than SE.
Almost ready to merge: http://hg.netbeans.org/ergonomics/rev/879820a7bc7e Contains compatible friend API change between core.startup and autoupdate.services and ide.ergonomics. The speedup is achieved by keeping essential Module information in a separate ModuleData class and delaying its initialization as much as possible. In case of empty ergonomics start, only platform, ide, nb, ergonomics and webcommon module manifests are parsed. This is ensured by a test. To achieve that I had to turn php.hudson and remotefs.versioning into recommended autoloads.
How about the measurements of the warm ergonomics start with some clusters activated (e.g. java)? To realistically compare ergonomics with the full build without ergonomics and with JavaSE edition, at least some clusters should be activated. In practice noone performs a warm start of ergonomics without any features activated. Thanks.
Merged as ergonomics#94ac8a6ab650 Re. measurements of ergo+java - yes, it should be measured and Petr C. can probably do it. But what should be the income? Faster than full edition and slower than plain java edition would be my expecation...
Merged once again as ergonomics#b0118b3609f0 - hopefully it will become part of main now.
Integrated into 'main-golden', will be available in build *201204040400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/94ac8a6ab650 User: Jaroslav Tulach <jtulach@netbeans.org> Log: Merge of #204513 as it seems relatively stable.