Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 328884 - Source lookup is horribly inefficient
Summary: Source lookup is horribly inefficient
Status: RESOLVED FIXED
Alias: None
Product: JSDT
Classification: WebTools
Component: Debug (show other bugs)
Version: 3.3   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.3 M3   Edit
Assignee: Michael Rennie CLA
QA Contact: Simon Kaegi CLA
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2010-10-27 16:17 EDT by Michael Rennie CLA
Modified: 2010-10-27 16:18 EDT (History)
1 user (show)

See Also:


Attachments
proposed fix (4.06 KB, patch)
2010-10-27 16: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-10-27 16:17:47 EDT
Created attachment 181878 [details]
proposed fix

code from HEAD

In its current state looking up external source performs terribly. Consider the following example:

1. connect to Crosssfire
2. suspend Firebug
3. source takes a lifetime to get the first time - has to go across the wire + maybe create the external sourc eproject + create the local replica of the source
4. resume Firebug
5. repeat steps 1 to 3 and notice it takes forever again

The reason is that we always ask the remote target for its source every single time - over the wire + create local replicas. We should do some caching to prevent so many over-the-wire calls. 

We should also change how we write the local file:

/External JavaScript Source/12346448/-211237349/webtrends.js

makes no sense compared to:

/External JavaScript Source/support.mozilla.com/media/js/webtrends.js

The attached patch adds some caching and better file creation. The source cache life-cycle is the same as the participant - it is cleared when the corresponding debug target is terminated.
Comment 1 Michael Rennie CLA 2010-10-27 16:18:48 EDT
applied to HEAD