Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 342480 - [editor] Indent selection very slow
Summary: [editor] Indent selection very slow
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: Silenio Quarti CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-11 13:57 EDT by John Arthorne CLA
Modified: 2011-09-01 11:43 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 John Arthorne CLA 2011-04-11 13:57:46 EDT
I20110411, FireFox 4

- Open the editor on a JS file of about 200 lines
- Select All, then hit Tab to indent selection

-> It takes about 5 seconds.

On a 500 line file it takes about 10 seconds. Performing "Undo" afterwards takes a similar amount of time. This seems incredibly slow compared to most other editor operations.
Comment 1 Silenio Quarti CLA 2011-04-11 22:08:34 EDT
I noticed this as well on all browsers. The problem happens because the key bindings added is editorFeatures.js alters the text line by line causing the editor to update the DOM once per line. 

Fixed by make all modifications in memory and altering the editor contents only once.

http://git.eclipse.org/c/e4/org.eclipse.orion.client.git/commit/?id=fd464d2c7675f18a82ec69f7771fb89c5899e6f5