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 57503 - Significant startup regression caused by org.netbeans.modules.vcscore.javacorebridge
Summary: Significant startup regression caused by org.netbeans.modules.vcscore.javacor...
Status: CLOSED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: vcsgeneric (show other bugs)
Version: 4.x
Hardware: All All
: P1 blocker (vote)
Assignee: Martin Entlicher
URL:
Keywords: PERFORMANCE, REGRESSION
Depends on:
Blocks:
 
Reported: 2005-04-05 22:17 UTC by Marian Mirilovic
Modified: 2006-03-24 12:54 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Log file generated on build 200503301800 (132.53 KB, text/plain)
2005-04-05 22:39 UTC, Marian Mirilovic
Details
Log file generated on build 200504010747 (133.50 KB, text/plain)
2005-04-05 22:40 UTC, Marian Mirilovic
Details
The textual diff of the fix. (1.72 KB, patch)
2005-04-06 11:25 UTC, Martin Entlicher
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marian Mirilovic 2005-04-05 22:17:10 UTC
Our performance tests find out regression on startup. 
It seems like it rises between 200503301800 and 200504010747 builds.
JDK1.5.2_02(fcs)

The biggest part of regression is in "Preparation phase" measured time.

RHE Linux 3  	JDS 2  	Solaris 9  	Solaris 10  	Win 2000  	Win XP
--------------------------------------------------------------------------------------------
200504010747

 IDE run 	
795 	20761 	1432 	2705 	650 	694
  ModuleSystem.readList finished 	
1362 	1251 	1926 	1901 	1410 	1526
  Preparation finished
14075 	14110 	23617 	22920 	12837 	14310
  Startup Time
1st usage 	21620 	41349 	34572 	34550 	18645 	21115
Subsequent usage 	20369 	40376 	32141 	31987 	17298 	19693
  Startup Time with 10 opened java files
24831 	58053 	61548 	63035 	22203 	25442
  Window system loaded
2055 	1957 	3501 	3462 	1203 	1668
  Window system shown
2533 	3298 	3590 	3289 	2371 	2883
--------------------------------------------------------------------------------------------


200503301800

  IDE run
729 	20770 	1403 	2576 	644 	692
  ModuleSystem.readList finished
1288 	1243 	1885 	1849 	1404 	1515
  Preparation finished
10663 	11488 	16857 	16272 	11019 	12235
  Startup Time
1st usage 	18081 	39032 	27352 	28033 	16963 	19172
Subsequent usage 	16796 	37908 	25024 	25320 	15528 	17510
  Startup Time with 10 opened java files
34242 	55643 	55341 	55713 	33749 	38223
  Window system loaded
2970 	2060 	3437 	3385 	1987 	2359
  Window system shown
2771 	3338 	3514 	3340 	2319 	2881
--------------------------------------------------------------------------------------------
Comment 1 Marian Mirilovic 2005-04-05 22:28:52 UTC
So I've found it :

I'll attach output from startup perf logs  and you can see that the build
200504010747 contains :

ModuleInstall for org.netbeans.modules.vcscore.javacorebridge/1 called dT=2499

but this line isn't present in log from build 200503301800 !


Comment 2 Marian Mirilovic 2005-04-05 22:39:43 UTC
Created attachment 21399 [details]
Log file generated on build 200503301800
Comment 3 Marian Mirilovic 2005-04-05 22:40:24 UTC
Created attachment 21400 [details]
Log file generated on build 200504010747
Comment 4 _ rkubacki 2005-04-06 10:36:37 UTC
The module install spents most 100% of its time in
java.util.Locale.getAvailableLocales() called from
VariableIO.getLocalizedConfigurations().

Note that we no longer have the regresion in VCS versioning submenu as we moved
it to startup. Apparently the configurations are more expensive in 4.1 after
Martin's fix of issue #52227.

Regarding startup - why do we initialize profiles info now ?!
Comment 5 Martin Entlicher 2005-04-06 11:08:35 UTC
This is a problem in initialization of the global VCS providers. We need to
attach a listener to them from javacorebridge, which cause their initialization.
The initialization needs to be made as lightweight as possible.
It takes 852ms for me on Pentium M 1.7GHz.
Comment 6 Martin Entlicher 2005-04-06 11:24:58 UTC
After the lazy initialization, the time fell down to 10ms:

/cvs/vcsgeneric/src/org/netbeans/modules/vcs/advanced/globalcommands/GlobalCommandsProvider.java,v
 <--  GlobalCommandsProvider.java
new revision: 1.10; previous revision: 1.9
Comment 7 Martin Entlicher 2005-04-06 11:25:43 UTC
Created attachment 21418 [details]
The textual diff of the fix.
Comment 8 Martin Entlicher 2005-04-06 11:26:32 UTC
Can someone from perf. team please verify this in trunk? Thanks.
Comment 9 _ rkubacki 2005-04-06 12:40:40 UTC
Looks good at least for vanilla start. I will wait for Marian results.

Probably only users using VCS support will suffer from this regression. Anyway
this can be tracked in issue #56980 (slow versioning submenu).
Comment 10 _ pkuzel 2005-04-06 14:37:38 UTC
Code deferral from contructor to initialize seems OK. 
REVIEWED
Comment 11 Marian Mirilovic 2005-04-06 14:44:05 UTC
I am waiting for the first continual build with this fix  and I'll run startup
perf tests on it .
Comment 12 Marian Mirilovic 2005-04-06 15:42:14 UTC
It seems like it's fixed in continual build - verified.
Comment 13 Petr Blaha 2005-04-06 17:08:58 UTC
mentlicher, can you commit the fix to q-build branch (release41-QBE200504051930)?
Comment 14 Martin Entlicher 2005-04-06 17:50:43 UTC
Which branch is the correct one?
There are two:
release41-QBE200504060831
release41-QBE200504051930

In the q-build report there is number 200504060831.
Comment 15 Petr Blaha 2005-04-07 08:30:35 UTC
Sorry, this one is correct release41-QBE200504060831.
Thanks
Comment 16 Martin Entlicher 2005-04-07 10:13:03 UTC
O.K. Thanks, it's there:

/cvs/vcsgeneric/src/org/netbeans/modules/vcs/advanced/globalcommands/GlobalCommandsProvider.java,v
 <--  GlobalCommandsProvider.java
new revision: 1.9.6.1; previous revision: 1.9
Comment 17 Martin Entlicher 2005-04-07 13:49:50 UTC
The fix is merged into release41 branch:

/cvs/vcsgeneric/src/org/netbeans/modules/vcs/advanced/globalcommands/GlobalCommandsProvider.java,v
 <--  GlobalCommandsProvider.java
new revision: 1.9.2.1; previous revision: 1.9
Comment 18 Marian Mirilovic 2005-04-12 07:55:06 UTC
verified in NB4.1 (200504111930)

thanks to everybody