Bug 135083

Summary: RangeUtil#isInInterval(...) takes significant amount of time while editing
Product: [Eclipse Project] JDT Reporter: Jerome Lanneluc <jerome_lanneluc>
Component: CoreAssignee: David Audel <david_audel>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, philippe_mulet
Version: 3.1Keywords: performance
Target Milestone: 3.2 RC1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed improvement none

Description Jerome Lanneluc CLA 2006-04-05 12:57:34 EDT
N20060405-0010

While editing class GenericTypeTests (adding a method at the end of the CU), my profiler indicates that 34% of the time is spent in RangeUtil#isInInterval(...).
Comment 1 David Audel CLA 2006-04-06 05:50:44 EDT
Created attachment 37858 [details]
Proposed improvement
Comment 2 David Audel CLA 2006-04-06 05:56:16 EDT
Jerome has profiled with the patch and time spent is now near 5%.

This patch avoid to scan all tokens inside method body and doesn't search intervals to avoid in all the array of intervals.
Comment 3 Philipe Mulet CLA 2006-04-06 11:19:19 EDT
+1 for 3.2RC1
Comment 4 David Audel CLA 2006-04-07 04:35:45 EDT
Fix released.
Comment 5 Maxime Daniel CLA 2006-04-13 12:09:36 EDT
Verified for 3.2 RC1 using Build id: I20060413-0010.
Comment 6 Jerome Lanneluc CLA 2006-04-21 12:22:52 EDT
Added performance test FullSourceWorkspaceModelTests#testPerfReconcileBigFileWithSyntaxError()