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 56980 - First invocation of a submenu of Versioning menu takes too long
Summary: First invocation of a submenu of Versioning menu takes too long
Status: CLOSED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: vcsgeneric (show other bugs)
Version: 4.x
Hardware: All All
: P2 blocker (vote)
Assignee: Martin Entlicher
URL:
Keywords: PERFORMANCE, UI
: 54919 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-03-25 11:07 UTC by Antonin Nebuzelsky
Modified: 2006-03-24 12:59 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
At least one AWT thread stacktrace (7.26 KB, text/plain)
2005-03-25 12:21 UTC, Antonin Nebuzelsky
Details
The textual patch of this issue. (8.71 KB, patch)
2005-04-11 14:53 UTC, Martin Entlicher
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antonin Nebuzelsky 2005-03-25 11:07:07 UTC
I measured 2400ms for the first invocation of Versioning/CVS submenu on my slow 
W2K machine. This is too long time. Should be optimized. (It does not matter 
which of the submenus you invoke first, if CVS, PVCS or VSS, this first 
invocation takes long.)
Comment 1 Antonin Nebuzelsky 2005-03-25 12:21:38 UTC
Created attachment 21133 [details]
At least one AWT thread stacktrace
Comment 2 Marian Mirilovic 2005-03-25 13:05:43 UTC
Tonda is right, 
we are measuring values arround 5s !!! for first invocation. 

See measured values from performance tests :
RHE Linux 3  	4785
JDS 2  	             3618
Solaris 9           7283 	
Solaris 10  	   7328
Win 2000  	 3187
Win XP            5171
Comment 3 Marian Mirilovic 2005-03-25 13:07:44 UTC
Ups, previous numbers are about Versioning main menu !!! (related to issue 54919)
Comment 4 Marian Mirilovic 2005-03-25 13:13:30 UTC
*** Issue 54919 has been marked as a duplicate of this issue. ***
Comment 5 Marian Mirilovic 2005-03-25 13:51:52 UTC
Once again (sorry) , the numbers are correct :

test case:
- run IDE
- push Versioning main menu
- select CVS submenu
-> CVS submenu is painted...

JDK 5.0_02 , NB4.1 (200503242007)

RHE Linux 3  	4785
JDS 2  	             3618
Solaris 9           7283 	
Solaris 10  	   7328
Win 2000  	 3187
Win XP            5171
Comment 6 Martin Entlicher 2005-03-25 14:19:46 UTC
We've made a performance fix into 4.0 regarding the main Versioning menu - see
issue #38108.

I'm afraid that we can not do much about it now. The times are much worse then
that reported in issue #38108, so I may have a quick look at it if I find some
regression. But I don't think we'll be able to really fix that (< 100ms) now.
Comment 7 Jan Chalupa 2005-03-25 14:47:08 UTC
Well, I'd think there's still a lot of room for improvement between 100 ms and 5
seconds.
Comment 8 _ rkubacki 2005-04-06 12:34:57 UTC
For a while we moved this to a startup. Now the problem is back in menu and the
observation from issue #57503 holds here. Most of the time is spent in
java.util.Locale.getAvailableLocales() called from
VariableIO.getLocalizedConfigurations(). Very likely this is caused by Martin's
fix of issue #52227.

I guess this should be P2 because >2 seconds quite bad perfromance and it is
worse than anytime sooner.
Comment 9 Martin Entlicher 2005-04-07 11:22:21 UTC
Radim's observation is correct.
Locale.getAvailableLocales(); takes 691 ms! while the whole
ProfilesFactory.initProfilesInfo() takes 741 ms. Therefore if we should improve
this, we *must* get rid of Locale.getAvailableLocales() call. :-(((
Comment 10 Martin Entlicher 2005-04-07 16:03:05 UTC
It is possible to fix this, but it will affect the functionality!
The profile names must not contain underscore. Otherwise they will be treated as
localized and ignored (if the letters that follows the undersore will not match
the current locale).

Due to this fact, we must add warning dialogs on places where user is saving a
new profile. This will be a UI change!
Comment 11 Martin Entlicher 2005-04-07 17:50:35 UTC
Fixed in trunk as proposed. Please verify the behavior in trunk. The performance
is much better, but please also verify the behavior of the question dialog that
is opened when a profile with an underscore in it's name is being saved.
Thanks.

/cvs/vcsgeneric/src/org/netbeans/modules/vcs/advanced/Bundle.properties,v  <-- 
Bundle.properties
new revision: 1.102; previous revision: 1.101

/cvs/vcsgeneric/src/org/netbeans/modules/vcs/advanced/ConfigSaveAsDialog.java,v
 <--  ConfigSaveAsDialog.java
new revision: 1.20; previous revision: 1.19

/cvs/vcsgeneric/src/org/netbeans/modules/vcs/advanced/profilesSettings/VcsSettingsNode.java,v
 <--  VcsSettingsNode.java
new revision: 1.7; previous revision: 1.6

/cvs/vcsgeneric/src/org/netbeans/modules/vcs/advanced/variables/VariableIO.java,v
 <--  VariableIO.java
new revision: 1.32; previous revision: 1.31
Comment 12 Martin Entlicher 2005-04-08 09:36:33 UTC
This issue is actually caused by:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4908648

Therefore this "fix" can be reverted after Locale.getAvailableLocales() has an
acceptable performance.
Comment 13 Martin Entlicher 2005-04-11 14:53:04 UTC
Created attachment 21543 [details]
The textual patch of this issue.
Comment 14 _ pkuzel 2005-04-11 14:55:32 UTC
It seems OK.

REVIEWED
Comment 15 Martin Entlicher 2005-04-11 15:07:44 UTC
Thanks for the review, the fix is merged into release41 branch:

/cvs/vcsgeneric/src/org/netbeans/modules/vcs/advanced/Bundle.properties,v  <-- 
Bundle.properties
new revision: 1.101.4.1; previous revision: 1.101

/cvs/vcsgeneric/src/org/netbeans/modules/vcs/advanced/ConfigSaveAsDialog.java,v
 <--  ConfigSaveAsDialog.java
new revision: 1.19.4.1; previous revision: 1.19

/cvs/vcsgeneric/src/org/netbeans/modules/vcs/advanced/profilesSettings/VcsSettingsNode.java,v
 <--  VcsSettingsNode.java
new revision: 1.6.14.1; previous revision: 1.6

/cvs/vcsgeneric/src/org/netbeans/modules/vcs/advanced/variables/VariableIO.java,v
 <--  VariableIO.java
new revision: 1.31.4.1; previous revision: 1.31
Comment 16 Antonin Nebuzelsky 2005-04-13 14:40:45 UTC
Verified in 4.1.
I measured 531ms for the first invocation of Versioning/CVS submenu on the slow
machine. Quite an improvement in comparison to the original 2400ms...