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

Bug 358645

Summary: Line insertion is long lines is slow
Product: [ECD] Orion Reporter: Kevin Dangoor <kid>
Component: EditorAssignee: Project Inbox <orion.editor-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: eclipse.felipe, mihai.sucan, Silenio_Quarti, simon_kaegi
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Kevin Dangoor CLA 2011-09-22 14:24:46 EDT
Build Identifier: 

I'm breaking this out from the "improve support for very long lines" bug (bug 354435) to ensure that this problem is tracked as well.

This corresponds to https://bugzilla.mozilla.org/show_bug.cgi?id=687865 in Mozilla's bugzilla.

Reproducible: Always

Steps to Reproduce:
1. Go to <https://bugzilla.mozilla.org/js/yui/yahoo-dom-event/yahoo-dom-event.js?1303753510>, select all, copy.
2. Go to scratchpad, select all, paste.
3. Put the caret on the middle of a long line, press Enter.
4. Now go to data:text/html,<textarea rows=10 cols=80 wrap=off>, paste.
5. Put the caret on the middle of a long line, press Enter.

In step 3, there is a visible delay between pressing enter, the rest of the line being moved to a new line, horizontal scrolling, and the caret showing up.  In step 5, all of that is instant.
Comment 1 Silenio Quarti CLA 2011-12-02 11:30:39 EST
We added some performance tests to measure text insertion and cursor navigation of very longs. These tests can be run from:

orion.eclipse.org/examples/textview/demo.html

We optimized the creation of very longs lines by reusing the line spans when possible. Before we were creating the whole line DOM when the text or style of any span in the line changed.

The improvement varies depending on the browser and test, but it is at least 25% faster.

Please try the latest and let us know whether the improvement is noticeable for you. 

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=7d233a995957a01c005b5b9bfb2d1447b4af6d59

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=dfc36f7bb02f10278045ecef401761daf7e4dc73
Comment 2 Mihai Sucan CLA 2011-12-05 16:11:39 EST
(In reply to comment #1)
> We added some performance tests to measure text insertion and cursor navigation
> of very longs. These tests can be run from:
> 
> orion.eclipse.org/examples/textview/demo.html
> 
> We optimized the creation of very longs lines by reusing the line spans when
> possible. Before we were creating the whole line DOM when the text or style of
> any span in the line changed.
> 
> The improvement varies depending on the browser and test, but it is at least
> 25% faster.
> 
> Please try the latest and let us know whether the improvement is noticeable for
> you. 
> 
> http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=7d233a995957a01c005b5b9bfb2d1447b4af6d59
> 
> http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=dfc36f7bb02f10278045ecef401761daf7e4dc73

Thanks a lot for your work. This is awesome stuff and it's quite faster for me (on my system).

There's one regression. STR:

1. Load the Orion simple demo, load some code (say JS).
2. Go to any line that is shorter than the line above it and press End.
3. Press Up.

Expected result: the cursor moves to the line up maintaining column X.

Actual result: the cursor moves to the line up + 1 char to the right.

Cause: a typo. Landed a fix:

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=dec27f40eb5fac83677cdae9b3c8e413a9b58d1c
Comment 3 Felipe Heidrich CLA 2011-12-05 17:04:44 EST
(In reply to comment #2)
> Thanks a lot for your work. This is awesome stuff and it's quite faster for me
> (on my system).

Awesome!

> 1. Load the Orion simple demo, load some code (say JS).
> 2. Go to any line that is shorter than the line above it and press End.
> 3. Press Up.
> 
> Expected result: the cursor moves to the line up maintaining column X.
> 
> Actual result: the cursor moves to the line up + 1 char to the right.
> 
> Cause: a typo. Landed a fix:
> 
> http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=dec27f40eb5fac83677cdae9b3c8e413a9b58d1c

Good catch! Please, feel free to push this change.
Comment 4 Mihai Sucan CLA 2011-12-06 10:53:07 EST
(In reply to comment #3)
> > http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=dec27f40eb5fac83677cdae9b3c8e413a9b58d1c
> 
> Good catch! Please, feel free to push this change.

Thanks! I already did. That's the push link. ;)
Comment 5 John Arthorne CLA 2015-05-05 15:47:39 EDT
Closing as part of a mass clean up of inactive bugs. Please reopen if this problem still occurs or is relevant to you. For more details see:


https://dev.eclipse.org/mhonarc/lists/orion-dev/msg03444.html
Comment 6 John Arthorne CLA 2015-05-05 16:01:09 EDT
Closing as part of a mass clean up of inactive bugs. Please reopen if this problem still occurs or is relevant to you. For more details see:


https://dev.eclipse.org/mhonarc/lists/orion-dev/msg03444.html