ui-tinymce icon indicating copy to clipboard operation
ui-tinymce copied to clipboard

Poor Performance With Lots Of Text

Open abtincbrians opened this issue 9 years ago • 8 comments

I'm running into an issue where users need to be able to copy & paste + type large amounts of text for a given field of data, such as a report description.

Once a large amount of text has been entered, when typing, the WYSIWYG editor begins to lag significantly, making it almost unusable. The problem seems to affect at least Chrome and IE, but probably most/all browsers.

I'll include a link to a Plunker demonstrating the issue. Run the code, then start typing in the WYSIWYG on the right hand side. The faster you type, the more you'll notice the lag. Now clear all the text out, and start typing again. You'll see the lag is gone. While this example is kind of extreme, the problem is, on Internet Explorer, and on less performant systems, the threshold for "large" amounts of text is as low as 50 words before the lag starts to make the WYSIWYG unusable. Also note, that this doesn't seem to be an issue when using only TinyMCE (sans Angular & ui-tinymce).

Plunker: https://plnkr.co/edit/mpRJHBr67962YqWdJ4UF

Let me know if I can provide any more info to help, or if you have suggestions on a workaround or fixes.

abtincbrians avatar Feb 03 '16 19:02 abtincbrians

Do you notice these issues on TinyMCE's demo pages without the use of our library?

deeg avatar Feb 03 '16 20:02 deeg

It does not happen on the demo pages, only when using ui-tinymce directive.

abtincbrians avatar Feb 03 '16 20:02 abtincbrians

Thanks for reporting, I do see the same thing you are seeing.

I will look into this, but I'm not sure what is causing it off the top of my head. Going to mark it as an enhancement since nothing is really broken.

If you have any fixes please feel free to put out a PR.

deeg avatar Feb 03 '16 22:02 deeg

Pull request issued, please review and advise, thanks.

abtincbrians avatar Feb 04 '16 23:02 abtincbrians

Although a pull request making this issue better has been merged in, I am going to leave the ticket open for now to see if we can improve upon it even more.

deeg avatar Feb 16 '16 01:02 deeg

Having a similar issue. Anyone have other thoughts on how to improve performance here? I'm a little stumped. Though the problem seems to be the ed.on ('something has changed'){ ed.save(); update...} function.

lauraerinmann avatar Feb 16 '16 23:02 lauraerinmann

@lauraerinmann, after this comment a new version was released to debounce updates.

This should have solved the issue a bit, I suggest updating to see some improvement. Will leave this PR open to see if we can't improve it more.

deeg avatar Feb 17 '16 23:02 deeg

@deeg yeah I noticed those changes and I added them to my application. Still the same issue when the amount of the content in the editor is sufficiently large.

lauraerinmann avatar Feb 18 '16 00:02 lauraerinmann