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 77963 - Expensive updates of project actions on lookup change
Summary: Expensive updates of project actions on lookup change
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Infrastructure (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Milos Kleint
URL:
Keywords: PERFORMANCE
Depends on:
Blocks: 80723
  Show dependency tree
 
Reported: 2006-06-15 10:12 UTC by _ rkubacki
Modified: 2007-07-25 10:31 UTC (History)
1 user (show)

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 2006-06-15 10:12:38 UTC
When node selection is changed in the IDE (click on some on in explorer for
example) LookupSensitiveActions are updated as they are notified about change in
lookup. That's OK because we really want to show the best name of action and set
its enabled state properly.

The problem is that these updates are expensive - they are usualy accessing
ProjectInformantion to get project name. This operation goes to AntProjectHelper
where it checks if there is a DOM tree representing project data and clones
them. Then we sometimes ignore returned value (popup menu of CloseProject, or if
there are more projects in selection). Another bad aspect is that we can compute
this information several times during one update of node selection to update
several actions.
Comment 1 _ rkubacki 2006-06-15 10:18:00 UTC
Hacks is another place where we are asking for display name of current project
to update window title when node selection is changed.
Comment 2 Jesse Glick 2006-06-15 16:45:06 UTC
Re. Hacks - trunk version already delays change of window title until after a
few hundred msec of inactivity, so it is much faster.
Comment 3 Petr Jiricka 2006-07-20 15:02:11 UTC
Are you saying trunk is much faster than release55 now?

I am wondering whether in that case, it would make sense to merge these
improvements to the NB 5.5, see also issue 80723. Thanks.
Comment 4 Milan Kubec 2007-03-23 11:40:11 UTC
Milosi, I think this belongs to code.
Comment 5 Milos Kleint 2007-07-25 10:31:09 UTC
fixed by weakreferencing a previously retrieved value and calling the projectInformation.getDisplayname() only when
actually needed.

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.13; previous revision: 1.12
done
Checking in j2ee/earproject/src/org/netbeans/modules/j2ee/earproject/EarProject.java;
/cvs/j2ee/earproject/src/org/netbeans/modules/j2ee/earproject/EarProject.java,v  <--  EarProject.java
new revision: 1.39; previous revision: 1.38
done
Checking in j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/EjbJarProject.java;
/cvs/j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/EjbJarProject.java,v  <--  EjbJarProject.java
new revision: 1.78; previous revision: 1.77
done
Checking in j2ee/archiveproject/src/org/netbeans/modules/j2ee/archive/project/ArchiveProject.java;
/cvs/j2ee/archiveproject/src/org/netbeans/modules/j2ee/archive/project/ArchiveProject.java,v  <--  ArchiveProject.java
new revision: 1.9; previous revision: 1.8
done
Checking in web/project/src/org/netbeans/modules/web/project/WebProject.java;
/cvs/web/project/src/org/netbeans/modules/web/project/WebProject.java,v  <--  WebProject.java
new revision: 1.137; previous revision: 1.136
done
Checking in j2ee/clientproject/src/org/netbeans/modules/j2ee/clientproject/AppClientProject.java;
/cvs/j2ee/clientproject/src/org/netbeans/modules/j2ee/clientproject/AppClientProject.java,v  <--  AppClientProject.java
new revision: 1.18; previous revision: 1.17
done
Checking in java/j2seproject/src/org/netbeans/modules/java/j2seproject/J2SEProject.java;
/cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/J2SEProject.java,v  <--  J2SEProject.java
new revision: 1.93; previous revision: 1.92
done