Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 368951 - Slow typing in big php files when Outline view is open
Summary: Slow typing in big php files when Outline view is open
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Natalia Bartol CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-18 07:45 EST by Natalia Bartol CLA
Modified: 2020-05-14 11:17 EDT (History)
2 users (show)

See Also:


Attachments
PHPContentOutlineProvider performance improvement - patch (4.63 KB, patch)
2012-01-18 07:51 EST, Natalia Bartol CLA
no flags Details | Diff
PHPStructuredEditor patch (1009 bytes, patch)
2012-01-18 09:10 EST, Natalia Bartol CLA
jacek.pospychala: iplog+
Details | Diff
PHPContentOutlineProvider performance improvement - patch II (7.73 KB, patch)
2012-01-18 13:13 EST, Natalia Bartol CLA
jacek.pospychala: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.