Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 336865 - [editor][performance] bad handling of StyleRange[] during onLineStyle causes performance degradation
Summary: [editor][performance] bad handling of StyleRange[] during onLineStyle causes ...
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Client (show other bugs)
Version: 0.2   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 0.2   Edit
Assignee: Felipe Heidrich CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-10 14:51 EST by Felipe Heidrich CLA
Modified: 2011-09-01 11:42 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Felipe Heidrich CLA 2011-02-10 14:51:36 EST
during the onLineStyle event the application should provided the editor with the styles for the given line. Style ranges (range.start, range.end) that are completely outside the line range (line.start, line.end) should be ignored.

When a range partially overlaps the line (for example, a range starts in line N-1 and ends  in line N) the editor clamps the range so that the portion of the range that belongs in the given line is used.

The bug in the editor is that ranges that were completely before the line range were being clamped to the line range, causing hundreds of the empty span elements to be inserted in the lines div. As the number of DOM elements that compose the editor grows some operations become very slow, for example, changing the DOM selection becomes very expensive.
Comment 1 Felipe Heidrich CLA 2011-02-10 14:53:06 EST
Note: this bug is not affecting Orion as the LineStyler used by Orion does not include style ranges that do not overlap the line.