Bug 27097 - IJavaElement.exists probably too expensive to call on selection changes
Summary: IJavaElement.exists probably too expensive to call on selection changes
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P2 normal (vote)
Target Milestone: 2.1 M4   Edit
Assignee: Adam Kiezun CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2002-11-25 11:16 EST by Adam Kiezun CLA
Modified: 2002-11-29 08:14 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Kiezun CLA 2002-11-25 11:16:32 EST
Openable.exists() creates a lot of garbage objects - it may be wise not to call 
it on selection changes
affected actions are:

FindAction.canOperateOn(IJavaElement)
ModifyParametersAction.shouldAcceptElement(IMethod)
MoveInnerToTopAction.shouldAcceptElement(IType)
OpenSuperImplementationAction.checkMethod(Object)
UseSupertypeAction.shouldAcceptElement(IType)
Comment 1 Dirk Baeumer CLA 2002-11-25 12:04:30 EST
Good point. This should go together with bug 24746 which states that on 
selection changes we shouldn't call exists.

I will close this PR and extend bug 24746 with the list of "guilty" classes.

*** This bug has been marked as a duplicate of 24746 ***
Comment 2 Dirk Baeumer CLA 2002-11-28 05:11:43 EST
Reopened since we should address this separately from 24746. Responsible coders:

Daniel Megert
  FindAction

Martin Aeschlimann
  OpenSuperImplementationAction

Adam Kiezun
  ModifyParamtersAction
  UseSupertypeAction
  MoveInnerToTopAction

Daniel, can you please have a look and then pass the PR to Martin.
Comment 3 Dani Megert CLA 2002-11-28 05:17:36 EST
created separat PR for FindAction: (see bug 27292)

Comment 4 Martin Aeschlimann CLA 2002-11-29 06:10:40 EST
Removed the exists() for OpenSuperImplementationAction,
however, there are still accesses that probably will internally do an exist() 
(IMethod.getFlags()). Have to find out if this is bad.

Moving to Adam
Comment 5 Adam Kiezun CLA 2002-11-29 08:14:24 EST
fixed