Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 368951

Summary: Slow typing in big php files when Outline view is open
Product: z_Archived Reporter: Natalia Bartol <natalia.bartol>
Component: PDTAssignee: Natalia Bartol <natalia.bartol>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jacek.pospychala, silviya
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
PHPContentOutlineProvider performance improvement - patch
none
PHPStructuredEditor patch
jacek.pospychala: iplog+
PHPContentOutlineProvider performance improvement - patch II jacek.pospychala: iplog+

Description Natalia Bartol CLA 2012-01-18 07:45:32 EST
Build Identifier: 

When working with big php file (>25k lines of code) it is noticeable that typing gets much slower and less smooth when Outline view is open. 
Also, closing Outline view on one perspective when it is still open on another one doesn’t improve typing performance. Only closing Outline view on all perspectives helps in this case. 


Reproducible: Always
Comment 1 Natalia Bartol CLA 2012-01-18 07:51:49 EST
Created attachment 209675 [details]
PHPContentOutlineProvider performance improvement - patch

Attached patch modifies PHPContentOutlineProvider class in a way that useStatements are now cached. The sourceModule is parsed only during first call to getChildren in main thread and it is updated later on every elementChangedEvent in non UI job. Typing gets smoother with Outline view open.
Comment 2 Natalia Bartol CLA 2012-01-18 09:10:25 EST
Created attachment 209677 [details]
PHPStructuredEditor patch

Small modification in PHPStructuredEditor: not updating Outline view if it is not visible on current perspective.
Comment 3 Natalia Bartol CLA 2012-01-18 13:13:35 EST
Created attachment 209699 [details]
PHPContentOutlineProvider performance improvement - patch II

Even better patch for PHPContentOutlineProvider. All AST operations should run in non UI thread on elementChanged event.
Comment 4 Jacek Pospychala CLA 2012-01-20 03:17:06 EST
fixed by Natalia

great work!
Comment 5 Jacek Pospychala CLA 2012-01-20 03:17:21 EST
fixed by Natalia,

great work!
Comment 6 Natalia Bartol CLA 2012-01-25 08:01:30 EST
Fix applied by Jacek.
Comment 7 Sylvia Tancheva CLA 2012-07-06 02:33:23 EDT
Verified. Closing.