Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 366720 - Poor performance when applying custom syntax highlighting preference when big PHP file is open in the editor
Summary: Poor performance when applying custom syntax highlighting preference when big...
Status: RESOLVED FIXED
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.sse (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 3.3.2   Edit
Assignee: Natalia Bartol CLA
QA Contact: Nitin Dahyabhai CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-14 11:15 EST by Natalia Bartol CLA
Modified: 2011-12-14 16:06 EST (History)
1 user (show)

See Also:


Attachments
Improved invalidation of text presentation on highlighting style changed event (1.66 KB, patch)
2011-12-14 11:24 EST, Natalia Bartol CLA
nsand.dev: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Natalia Bartol CLA 2011-12-14 11:15:11 EST
Build Identifier: 

Attempt to apply custom syntax highlighting preference, i.e. new color for methods, when big PHP file is open in the editor (> 25k lines of code) freezes UI for few minutes. 


Reproducible: Always
Comment 1 Natalia Bartol CLA 2011-12-14 11:24:50 EST
Created attachment 208388 [details]
Improved invalidation of text presentation on highlighting style changed event

org.eclipse.wst.sse.ui.internal.style.SemanticHighlightingPresenter.highlightingStyleChanged(HighlightingStyle highlighting)
operation seems to be very inefficient. Whole text representation is invalidated every time the 
if (position.getHighlighting() == highlighting && fSourceViewer instanceof ITextViewerExtension2)
condition is not met. 

Attached patch changes the flow and makes it similar to 
SemanticHighlightingPresenter.invalidateTextPresentation().
Comment 2 Nick Sandonato CLA 2011-12-14 16:06:22 EST
Thanks for the patch, Natalia. This looks like it'll help immensely! I've checked in the code for Indigo SR2 and Juno.