Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#14231 closed task (fixed)

Performance issues with the Dojo Editor in IE8/7

Reported by: Herman Lo Owned by: bill
Priority: high Milestone: 1.8
Component: Editor Version: 1.6.1
Keywords: Cc:
Blocked by: Blocking:

Description

Machine Spec: Intel Core Duo 2.2ghz, 3gb ram, Windows XP.

Under IE8, a dojo editor loaded with 3000 lines takes approximately 10˜ seconds to complete an operation. Attached a sample editor with the standard plugins plus three sample rudimentary plugins to demonstrate the issue (Move attached files to \dojo\dijit\tests\editor\).

this.editor. get('value');
this.editor.set('value', html);
this.editor.execCommand("insert html", 
      "<span class=\"cursorSpan\">Insert</span&g t;");

Given the performance issues with IE in general, some performance degradation is to be expected in comparison to other browsers but the performance gap is markedly noticeable. We can partially compensate for the issue by minimizing our manipulation of the text content and relying on progress dialogs but in certain cases where we need to manipulate the text in near real-time this may not be an option.

In a similar vein, we're experiencing issues with the editor after each edit. From my understanding, the editor will copy the text content into an internal array, so that it can maintain an undo history. However, in the case of the editor described above, the editor and browser will freeze for several seconds after each edit while the undo array is been populated.

Setting the customUndo flag to false, will disable the editor's undo functionality and instead fall back to the browser's native implementation of undo. However, the editor continues tracking the undo history after each edit. Is this the expected behavior?

Attachments (6)

test_Editor_performance.html (1.2 KB) - added by bill 6 years ago.
performance test
TestPluginGet.js (1.5 KB) - added by bill 6 years ago.
plugin to run get test
TestPluginInsert.js (1.7 KB) - added by bill 6 years ago.
plugin to test insert
TestPluginSet.js (99.2 KB) - added by bill 6 years ago.
plugin to test set
editor_html.patch (626 bytes) - added by bill 6 years ago.
patch to use cloneNode() and avoid apparently unnecessary node.outerHTML reference
func.php (2.8 KB) - added by Slavon 4 years ago.
http://howtotreatpot.tumblr.com/

Download all attachments as: .zip

Change History (11)

Changed 6 years ago by bill

performance test

Changed 6 years ago by bill

plugin to run get test

Changed 6 years ago by bill

plugin to test insert

Changed 6 years ago by bill

plugin to test set

Changed 6 years ago by bill

patch to use cloneNode() and avoid apparently unnecessary node.outerHTML reference

comment:1 Changed 6 years ago by bill

  • Owner set to bill
  • Resolution set to fixed
  • Status changed from new to closed

In [26975]:

Performance tweaks for editor's getNodeHtml(), gives about 10x performance boost on IE8 (see test_Editor_performance.html test case). Also adding small automated test for dijit/_editor/html.html. Fixes #14231 !strict, although I may check in further tweaks.

comment:2 Changed 6 years ago by bill

In [26983]:

More performance tweaks for editor's getNodeHtml(), gives about 4x performance boost on IE6 (see test_performance.html test case). Refs #14231 !strict.

comment:3 Changed 6 years ago by bill

In [26984]:

Test for escaping of HTML text content. Refs #14231 !strict.

comment:4 Changed 6 years ago by bill

In [28084]:

IE9 prints style with a closing semicolon: style="width: 10%; height: 10%;". Refs #14231.

comment:5 Changed 6 years ago by bill

In [28091]:

svn:eol-style, refs #14231

Changed 4 years ago by Slavon

Note: See TracTickets for help on using tickets.