Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 323152 - JSDT Debug hemorrhaging global script load breakpoints
Summary: JSDT Debug hemorrhaging global script load breakpoints
Status: VERIFIED FIXED
Alias: None
Product: JSDT
Classification: WebTools
Component: Debug (show other bugs)
Version: 3.2   Edit
Hardware: PC Linux
: P3 major (vote)
Target Milestone: 3.3 M2   Edit
Assignee: Michael Rennie CLA
QA Contact: Simon Kaegi CLA
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2010-08-19 10:49 EDT by Michael Rennie CLA
Modified: 2010-08-20 15:02 EDT (History)
2 users (show)

See Also:
curtis.windatt.public: review+


Attachments
fix (4.26 KB, patch)
2010-08-19 12:17 EDT, Michael Rennie CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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