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.

Bug 31008

Summary: Try loading base variant of a localized resource first, to prime domain cache
Product: platform Reporter: Jesse Glick <jglick>
Component: -- Other --Assignee: Jesse Glick <jglick>
Status: RESOLVED FIXED    
Severity: blocker CC: pnejedly
Priority: P2 Keywords: PERFORMANCE
Version: 3.x   
Hardware: PC   
OS: Linux   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on:    
Bug Blocks: 21675    

Description Jesse Glick 2003-02-12 18:04:44 UTC
pnejedly says this will help reduce domain cache
misses in ProxyClassLoader during startup.
Comment 1 Jesse Glick 2003-02-12 18:16:38 UTC
Have working patch, will try to measure effect.
Comment 2 Jesse Glick 2003-02-12 22:23:40 UTC
Effects on S1S EE Japanese are modest by my measurements:

S1SEE-JA -locale ja:JP:

Average times: unoptimized  18.765244269371
                 std. dev.  0.560662397765926
                 optimized  18.5139294465383
                 std. dev.  0.451175498263345
Improvement:                0.251314822832743
Percentage:                 1.33925686884313%

added -nosplash -nogui:

Average times: unoptimized  12.6993439912796
                 std. dev.  0.0579590724132238
                 optimized  12.6476140022278
                 std. dev.  0.0473816411792489
Improvement:                0.0517299890518181
Percentage:                 0.407343789469284%

Will try to check whether they are larger when warmup tasks are included.
Comment 3 Jesse Glick 2003-02-12 23:17:31 UTC
When including warmup tasks (-J-Dnetbeans.warm.close=true, patch to be
committed), improvement is a little better. Still barely larger than
standard deviation (which is rather high in GUI mode).

Average times: unoptimized  24.9868405103683
                 std. dev.  0.43939068472289
                 optimized  24.4092321952184
                 std. dev.  0.453632799339985
Improvement:                0.577608315149941
Percentage:                 2.31165006600279%
Comment 4 Petr Nejedly 2003-02-13 11:17:59 UTC
OK, I see the problem in disabled caching for everything
under org/opoenide and org/netbeans/core
A lot of resources are loaded from there and the primer
won't preheat tha cache - the cache is not used really,
so it may even hurt the performance for these requests
if not carefully implemented.

(In my impl,  I just did one dummy query and then the cycle,
relying on the fact that the last query, which is the same
as the first, will be fast due to caching, it it isn't
due to caching exception. Smarter implementation could skip
the last step and use original dummy value.)
Comment 5 Jesse Glick 2003-02-13 15:04:57 UTC
BTW w/ warmup tasks, nosplash, nogui:

Average times: unoptimized  14.7502917369207
                 std. dev.  0.0177164027934198
                 optimized  14.8270389397939
                 std. dev.  0.193928258651725
Improvement:                -0.0767472028732303
Percentage:                 -0.520309728390853%
Comment 6 Jesse Glick 2003-02-13 16:27:16 UTC
My impl is "smart" I guess - saves the original unbranded/unlocalized
value in case there are no others, rather than asking the class loader
again.
Comment 7 Jesse Glick 2003-02-14 03:12:46 UTC
committed   * Up-To-Date  1.51       
openide/src/org/openide/util/NbBundle.java
committed   * Up-To-Date  1.125      
openide/src/org/openide/util/Utilities.java