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 49777 - Eager action in o.n.m.utilities.project module
Summary: Eager action in o.n.m.utilities.project module
Status: RESOLVED FIXED
Alias: None
Product: utilities
Classification: Unclassified
Component: Search (show other bugs)
Version: 4.x
Hardware: All All
: P3 blocker (vote)
Assignee: Marian Petras
URL:
Keywords: PERFORMANCE
Depends on:
Blocks: 49990
  Show dependency tree
 
Reported: 2004-10-01 10:42 UTC by _ rkubacki
Modified: 2004-10-11 09:43 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
patch for suggested change (7.12 KB, patch)
2004-10-01 10:44 UTC, _ rkubacki
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description _ rkubacki 2004-10-01 10:42:52 UTC
dev build from Sep 30, 2004, JDK1.5.0b64, Linux

I tried to profile IDE startup with two small
projects opened and three Java files and realized
that o.n.m.utilities.project module takes 900 ms
on startup. It seems that there is full GC running
during it but anyway: the module loads its own
callable system action that attaches listener to
OpenProjects so it pays for initialization of the
whole project system.

My suggestion: replace the system action with more
lightweight Swing action that will check its
enable state on demand (the check is almost
instanteous) rather than actively listening on
changes. This also allows to remove module install
class and postpone teh init of project system.
Optimistically we will then init projects when all
modules are loaded & installed.
Comment 1 _ rkubacki 2004-10-01 10:44:05 UTC
Created attachment 17965 [details]
patch for suggested change
Comment 2 _ rkubacki 2004-10-01 10:45:17 UTC
The patch is attached. I am not sure if the item ordering is correct
but seems to be functional.
Comment 3 Marian Petras 2004-10-11 09:39:23 UTC
The suggested solution would not work if the action was put on a
toolbar. So I will do a mix of the previous solution (continuous
update) and your solution (update on demand) as follows:

If the action is not on a toolbar, use update on demand. If the action
is on a toolbar, update the action's state continuously (listening on
the list of open projects).
Comment 4 Marian Petras 2004-10-11 09:43:37 UTC
Fixed in the trunk, using the above described mechanism.

Modified files:

   utilities/project:
      manifest.mf   (1.3)
      src/org/netbeans/modules/search/project/Installer.java
                                         (deleted - last revision 1.1)
      src/org/netbeans/modules/search/project/ProjectsSearchAction.java
                                                                 (1.6)