Bug 5257 - Set breakpoint takes very long
Summary: Set breakpoint takes very long
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P1 normal (vote)
Target Milestone: ---   Edit
Assignee: Darin Wright CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 5817 (view as bug list)
Depends on:
Blocks:
 
Reported: 2001-10-25 12:58 EDT by Martin Aeschlimann CLA
Modified: 2001-11-13 10:44 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 Martin Aeschlimann CLA 2001-10-25 12:58:22 EDT
1. set a breakpoint in JavaOutlinePage, ElementChangedListener elementChanged
 after 'public void run() {'
2. takes about 5 seconds
Comment 1 Darin Swanson CLA 2001-10-31 16:29:12 EST
I can only reproduce the problem is I am self-hosting...that is the 
JavaOutlinePage has been loaded.  As well the delay only occurs putting 
breakpoints in the inner classes.
Comment 2 Darin Swanson CLA 2001-10-31 17:57:31 EST
Seems to be a problem in classes with numerous inner classes and you are 
attempting to put a breakpoint in an inner class that is not yet prepared 
(loaded).  In this case there are 11 inner classes (named and anonymous).  We 
walk all of them and ask for the location for the line number.  Seems to 
strictly be the buildup of all of these location requests to the VM.
It looks like trying to find locations for these types of cases (inner 
anonymous classes in classes with lots of inner classes) will be slow and 
expensive.  Now to try to find a better way...
Comment 3 Darin Swanson CLA 2001-11-02 15:58:35 EST
We were doing much more work than required when dealing with nested types.
Fixed in JavaLineBreakpoint#determineLocations
Comment 4 Darin Swanson CLA 2001-11-02 15:59:08 EST
Please verify
Comment 5 Darin Wright CLA 2001-11-02 16:37:20 EST
Verified.
Comment 6 Darin Wright CLA 2001-11-06 10:27:36 EST
Non-deferred breakpoints in inner types no longer work. I.e. if an inner type 
is already loaded, and you add a breakpoint to the type, it does not get 
installed.

Comment 7 Darin Swanson CLA 2001-11-07 09:59:32 EST
Reworked.  ReferenceType.nestedTypes() is implemented such that it does String 
matching on all of the loaded types in the VM to find any nested types of the 
type (slow).  The implementation only uses this call for local nested types 
(types defined in methods). Added test to Nondeferred breakpoint tests for 
adding breakpoint to a loaded inner class.
Comment 8 Darin Wright CLA 2001-11-07 13:38:57 EST
Verified.
Comment 9 Darin Wright CLA 2001-11-13 10:44:26 EST
*** Bug 5817 has been marked as a duplicate of this bug. ***