Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 323152

Summary: JSDT Debug hemorrhaging global script load breakpoints
Product: [WebTools] JSDT Reporter: Michael Rennie <Michael_Rennie>
Component: DebugAssignee: Michael Rennie <Michael_Rennie>
Status: VERIFIED FIXED QA Contact: Simon Kaegi <simon_kaegi>
Severity: major    
Priority: P3 CC: curtis.windatt.public, thatnitind
Version: 3.2Keywords: performance
Target Milestone: 3.3 M2Flags: curtis.windatt.public: review+
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
fix none

Description Michael Rennie CLA 2010-08-19 10:49:25 EDT
profiling an annoying OOE I stumbled across an inspection telling me I had 608 duplicates of the string "org.eclipse.wst.jsdt.debug.model". When I dug into this I found that at workbench startup 608 global suspend breakpoints were restored from meta data for us.

Steps

1. simplest way - put a breakpoint in BreakpointManager.loadBreakpoints(IResource resource, boolean notify) line 273 when you start a target workspace
2. start target workspace and remove all breakpoints
3. open the launch dialog to load the JSDT debug plugins
4. shut down the target workspace
5. restart the target workspace with the breakpoint set as in step 1
6. notice you have exactly one more global suspend breakpoint than you had last time

Expected:

there should only be one script load breakpoint with the global_suspend attribute set

Happens

In my case there were 607 too many of them.
Comment 1 Michael Rennie CLA 2010-08-19 12:17:06 EDT
Created attachment 177021 [details]
fix

The patch does two things:

1. prevents either of the singleton breakpoints from being persisted again
2. adds a check in the stop method to ensure they have been cleaned up
Comment 2 Michael Rennie CLA 2010-08-19 12:17:41 EDT
Curtis, please give the patch a whirl
Comment 3 Michael Rennie CLA 2010-08-19 12:34:17 EDT
applied patch to HEAD
Comment 4 Curtis Windatt CLA 2010-08-20 15:02:19 EDT
+1 Verified