Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 364944 - Poor editor(indentation) performance when editing multiline string
Summary: Poor editor(indentation) performance when editing multiline string
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: PHP Core CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-28 07:57 EST by Natalia Bartol CLA
Modified: 2020-05-14 11:18 EDT (History)
2 users (show)

See Also:


Attachments
acceleratorBenchmark.php - PHP file with very long multiline quoted string (219.04 KB, application/php)
2011-11-28 07:59 EST, Natalia Bartol CLA
no flags Details
Indentation performance improvement - patch (8.68 KB, patch)
2011-11-28 08:12 EST, Natalia Bartol CLA
jacek.pospychala: iplog+
Details | Diff
Wrong indentation case fixed - patch (2.39 KB, patch)
2011-11-30 14:42 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 2011-11-28 07:57:27 EST
Build Identifier: 

Indentation mechanism takes a lot of time when Enter key is hit in the middle of multi line quoted string. 

See attached example acceleratorBenchmark.php file. Hit enter anywhere in the middle/at the end of string.

Reproducible: Always
Comment 1 Natalia Bartol CLA 2011-11-28 07:59:08 EST
Created attachment 207594 [details]
acceleratorBenchmark.php - PHP file with very long multiline quoted string
Comment 2 Natalia Bartol CLA 2011-11-28 08:12:19 EST
Created attachment 207596 [details]
Indentation performance improvement - patch

Attached patch improves:
1. Finding next character position in scanBackward() method (fixed PHPHeuristicScanner.getPartition()).
2. Checking for multiline tokens in DefaultIndentationStrategy.getIndentationBaseLine() has been added.
Comment 3 Zhongwei Zhao CLA 2011-11-28 09:05:02 EST
thanks,Natalia
Comment 4 Natalia Bartol CLA 2011-11-30 14:42:55 EST
Created attachment 207754 [details]
Wrong indentation case fixed - patch

I've found one wrong indentation scenario introduced by previous patch:

In unit tests attached to bug: Bug 365235
Test case arrayStatemets4.pdtt.

Attached patch fixes this issue.
Comment 5 Natalia Bartol CLA 2011-11-30 14:43:41 EST
One incorrect indentation scenario found. Patch attached.
Comment 6 Zhongwei Zhao CLA 2011-12-01 03:59:09 EST
committed,thanks!
Comment 7 Sylvia Tancheva CLA 2012-07-06 08:55:07 EDT
Verified. Closing
Ilina Stefanova