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 46193 - Too many string processing in VcsUtilities.getBundleString
Summary: Too many string processing in VcsUtilities.getBundleString
Status: RESOLVED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: vcscore (show other bugs)
Version: 4.x
Hardware: PC Linux
: P4 blocker (vote)
Assignee: Martin Entlicher
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2004-07-15 13:40 UTC by _ rkubacki
Modified: 2004-08-13 12:12 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ rkubacki 2004-07-15 13:40:09 UTC
During lookup initialization
VariableIO.getConfigurationLabelAndOS is called
and spents a lot of time in
VcsUtilities.getBundleString that performs a heavy
string processing (111ms on my Ultra60 when
running under Sun Analyzer that does sampling
every 1ms). Maybe we can optimize it. Store the
created result in a temp StringBuffer to avoid
many new String instances that are searched again
and again for another occurence of 'getBundle'
pattern. Perhaps couple of other minor
optimizations to avoid repeated calls to
String.charAt in one loop iteration and similar.
Comment 1 Martin Entlicher 2004-07-15 15:36:32 UTC
True. That reminds me, that I was thinking about this also when fixing
issue #38108. Perhaps a fix of this can help to reduce the time that
is spent in #38108, but nonetheless it will not be sufficient.
Comment 2 _ rkubacki 2004-07-16 17:21:28 UTC
/cvs/vcscore/src/org/netbeans/modules/vcscore/util/VcsUtilities.java,v
 <--  VcsUtilities.java
new revision: 1.37; previous revision: 1.36

improved a bit. I will look in analyzer again to see if it is worth to
do more.
Comment 3 Martin Entlicher 2004-07-27 12:49:11 UTC
This has impact on issue #38108. I'll try to do something with it,
more complex strings (composed of several messages loaded from
ResourceBundle) take several milliseconds.
Comment 4 Martin Entlicher 2004-07-28 11:11:48 UTC
Fixed in trunk.
A new, more efficient, method VcsUtilities.getBundleString() was
written. The profile can define a list of resource bundles, which are
temporarily cached for reading of localized messages.
Also the keyword for localized message in XML profile is much shorter.
In InputDescriptors we do not load localized message when reading
command properties. These are resolved later, when the input
descriptor is parsed.

Checking in
vcscore/src/org/netbeans/modules/vcscore/commands/CommandCustomizationSupport.java;
/cvs/vcscore/src/org/netbeans/modules/vcscore/commands/CommandCustomizationSupport.java,v
 <--  CommandCustomizationSupport.java
new revision: 1.28; previous revision: 1.27
done
Processing log script arguments...
More commits to come...
Checking in
vcscore/src/org/netbeans/modules/vcscore/util/VariableInputDescriptor.java;
/cvs/vcscore/src/org/netbeans/modules/vcscore/util/VariableInputDescriptor.java,v
 <--  VariableInputDescriptor.java
new revision: 1.21; previous revision: 1.20
done
Checking in
vcscore/src/org/netbeans/modules/vcscore/util/VcsUtilities.java;
/cvs/vcscore/src/org/netbeans/modules/vcscore/util/VcsUtilities.java,v
 <--  VcsUtilities.java
new revision: 1.38; previous revision: 1.37
done
Processing log script arguments...
More commits to come...
Checking in
vcsgeneric/src/org/netbeans/modules/vcs/advanced/ProfileContentHandler.java;
/cvs/vcsgeneric/src/org/netbeans/modules/vcs/advanced/ProfileContentHandler.java,v
 <--  ProfileContentHandler.java
new revision: 1.3; previous revision: 1.2
done
Checking in
vcsgeneric/src/org/netbeans/modules/vcs/advanced/ProfilesFactory.java;
/cvs/vcsgeneric/src/org/netbeans/modules/vcs/advanced/ProfilesFactory.java,v
 <--  ProfilesFactory.java
new revision: 1.12; previous revision: 1.11
done
Checking in
vcsgeneric/src/org/netbeans/modules/vcs/advanced/UserConditionedVariablesPanel.java;
/cvs/vcsgeneric/src/org/netbeans/modules/vcs/advanced/UserConditionedVariablesPanel.java,v
 <--  UserConditionedVariablesPanel.java
new revision: 1.9; previous revision: 1.8
done
Checking in
vcsgeneric/src/org/netbeans/modules/vcs/advanced/VcsCustomizer.java;
/cvs/vcsgeneric/src/org/netbeans/modules/vcs/advanced/VcsCustomizer.java,v
 <--  VcsCustomizer.java
new revision: 1.137; previous revision: 1.136
done
Processing log script arguments...
More commits to come...
Checking in
vcsgeneric/src/org/netbeans/modules/vcs/advanced/commands/UserCommandIO.java;
/cvs/vcsgeneric/src/org/netbeans/modules/vcs/advanced/commands/UserCommandIO.java,v
 <--  UserCommandIO.java
new revision: 1.20; previous revision: 1.19
done
Processing log script arguments...
More commits to come...
Checking in
vcsgeneric/src/org/netbeans/modules/vcs/advanced/variables/VariableIO.java;
/cvs/vcsgeneric/src/org/netbeans/modules/vcs/advanced/variables/VariableIO.java,v
 <--  VariableIO.java
new revision: 1.25; previous revision: 1.24
done
Processing log script arguments...
More commits to come...
Checking in
vcsgeneric/src/org/netbeans/modules/vcs/profiles/config/vcs-configuration-1_1.dtd;
/cvs/vcsgeneric/src/org/netbeans/modules/vcs/profiles/config/vcs-configuration-1_1.dtd,v
 <--  vcs-configuration-1_1.dtd
new revision: 1.3; previous revision: 1.2
done
Processing log script arguments...
More commits to come...
Checking in
vcsgeneric/profiles/cvsprofiles/src/org/netbeans/modules/vcs/profiles/cvsprofiles/config/cvs.xml;
/cvs/vcsgeneric/profiles/cvsprofiles/src/org/netbeans/modules/vcs/profiles/cvsprofiles/config/cvs.xml,v
 <--  cvs.xml
new revision: 1.79; previous revision: 1.78
done
Processing log script arguments...
More commits to come...
Checking in
vcsgeneric/profiles/pvcs/src/org/netbeans/modules/vcs/profiles/pvcs/config/pvcs.xml;
/cvs/vcsgeneric/profiles/pvcs/src/org/netbeans/modules/vcs/profiles/pvcs/config/pvcs.xml,v
 <--  pvcs.xml
new revision: 1.33; previous revision: 1.32
done
Checking in
vcsgeneric/profiles/pvcs/src/org/netbeans/modules/vcs/profiles/pvcs/config/pvcsLoc_XX.xml;
/cvs/vcsgeneric/profiles/pvcs/src/org/netbeans/modules/vcs/profiles/pvcs/config/pvcsLoc_XX.xml,v
 <--  pvcsLoc_XX.xml
new revision: 1.29; previous revision: 1.28
done
Processing log script arguments...
More commits to come...
Checking in
vcsgeneric/profiles/vss/src/org/netbeans/modules/vcs/profiles/vss/config/vss.xml;
/cvs/vcsgeneric/profiles/vss/src/org/netbeans/modules/vcs/profiles/vss/config/vss.xml,v
 <--  vss.xml
new revision: 1.29; previous revision: 1.28
done
Checking in
vcsgeneric/profiles/vss/src/org/netbeans/modules/vcs/profiles/vss/config/vssLoc_XX.xml;
/cvs/vcsgeneric/profiles/vss/src/org/netbeans/modules/vcs/profiles/vss/config/vssLoc_XX.xml,v
 <--  vssLoc_XX.xml
new revision: 1.23; previous revision: 1.22
done
Processing log script arguments...
More commits to come...
Checking in www/www/dtds/vcs-configuration-1_1.dtd;
/cvs/www/www/dtds/vcs-configuration-1_1.dtd,v  <-- 
vcs-configuration-1_1.dtd
new revision: 1.3; previous revision: 1.2
done