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 48720 - Use of MessageFormat in ActionsUtil is slow
Summary: Use of MessageFormat in ActionsUtil is slow
Status: CLOSED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Infrastructure (show other bugs)
Version: 4.x
Hardware: PC Linux
: P4 blocker (vote)
Assignee: Petr Hrebejk
URL:
Keywords: PERFORMANCE
Depends on:
Blocks: 41535
  Show dependency tree
 
Reported: 2004-09-08 19:25 UTC by Jesse Glick
Modified: 2006-03-24 10:15 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 Jesse Glick 2004-09-08 19:25:43 UTC
7.7% of CPU when closing many projects is in
java.text.ChoiceFormat.<init>. This is plain
stupid. Call chain:

CloseProject.actionPerformed
OpenProjectList.close
CloseProject.propertyChange
CloseProject.refresh
ActionsUtil.formatProjectSensitiveName
ActionsUtil.formatName

Problems:

1. Closing many projects at once in OPL.close
would make this automatically faster.

2. CloseProject.refresh is updating the popup name
even though the popup is not currently displayed.
Why? No one cares what the label is until it is shown.

3. ActionsUtil.formatName should somehow let the
project cache a Format object, rather than
creating one fresh each time.
Comment 1 _ rkubacki 2004-09-20 09:17:23 UTC
re 2: this is similar to issue 46343
Comment 2 Jesse Glick 2004-09-20 15:16:18 UTC
Confirmed, #2 is handled by issue #46343.

#1 is also already fixed, I think.

So leaving open for #3.
Comment 3 Petr Hrebejk 2004-09-30 12:06:59 UTC
Cache added

Checking in
projects/projectui/src/org/netbeans/modules/project/ui/actions/ActionsUtil.java;
/cvs/projects/projectui/src/org/netbeans/modules/project/ui/actions/ActionsUtil.java,v
 <--  ActionsUtil.java
new revision: 1.4; previous revision: 1.3
done
Comment 4 Marian Mirilovic 2005-12-20 15:50:35 UTC
This issue was solved long time ago. Because nobody has reopened it neither
added comments, we are verifying/closing it now. 
If you are still able to reproduce the problem, please reopen. Thanks in advance.