简体   繁体   English

带有scayt的CKeditor4在IE11和Edge上运行速度非常慢

[英]CKeditor4 with scayt very slow on IE11 and Edge on larger documents

Using ckeditor4 in an Angular 1.6 webapp. 在Angular 1.6 Web应用程序中使用ckeditor4。 Works fine but when enabling SCAYT the whole app/ckeditor get sluggish if you run it on IE11 or Edge. 工作正常,但启用SCAYT时,如果在IE11或Edge上运行,则整个应用程序/ ckeditor都会变慢。 It works quite ok when running in Chrome. 在Chrome中运行时,效果很好。

Can be easily reproduced on https://ckeditor.com/ckeditor-4/#document Use https://www.lipsum.com/ to generate 20 000 bytes of text which really isn't that much and paste it in the editor. 可以在https://ckeditor.com/ckeditor-4/#document上轻松复制。使用https://www.lipsum.com/生成20000字节的文本,实际上不是那么多,并将其粘贴到编辑器中。 Then enable SCAYT, and you will see Edge increasing CPU to 19% and memory alternating from 250 to 340 MB. 然后启用SCAYT,您将看到Edge将CPU增加到19%,并且内存从250 MB更改为340 MB。 Try adding some more text to the editor - it is almost impossible. 尝试向编辑器中添加更多文本-这几乎是不可能的。

Any tricks to support SCAYT in IE11 and Edge for CKEditor4? 有什么技巧可以在IE11和Edge中为CKEditor4支持SCAYT? Any other plugin to recommend? 还有其他推荐的插件吗?

SCAYT tool checks text by small portions up to 10 words at a time. SCAYT工具一次最多可检查多达10个单词的小部分文本。 The larger the document the more time is needed for processing. 文件越大,处理所需的时间越多。 However, SCAYT shouldn't have affected or blocked the work of CKEditor (adding more text, etc.). 但是,SCAYT不应影响或阻止CKEditor的工作(添加更多文本等)。

We are able to reproduce the problem with SCAYT performance in IE/Edge using your steps and sample Lorem ipsum text. 我们可以使用您的步骤并通过示例Lorem ipsum文本重现IE / Edge中SCAYT性能的问题。 In your case, the root cause of the SCAYT performance issue is not only the size of the text but and the percentage of misspelled words in this text. 对于您而言,SCAYT性能问题的根本原因不仅在于文本的大小,还在于文本中拼写错误的单词所占的百分比。 For Lorem ipsum text, it is about 99% percent of words that are incorrect, which SCAYT detects and underlines (marks) as incorrect. 对于Lorem ipsum文本,大约有99%的单词不正确,SCAYT会将其检测为错误并加下划线(标记)。

If you try to use any real text (even with number of errors) instead of Lorem ipsum, you shouldn't have such dramatic increase of CPU utilization or memory consumption. 如果您尝试使用任何真实文本(即使有错误数量)而不是Lorem ipsum,则CPU利用率或内存消耗不会显着增加。

Alternatively, you may consider trying another spellcheck plugin provided along with SCAYT in CKEditor – WebSpellChecker Dialog. 或者,您可以考虑尝试在CKEditor – WebSpellChecker对话框中与SCAYT一起提供的另一个拼写检查插件。 It is also available under ABC button –> Spell Checking. 在ABC按钮->拼写检查下也可以使用。 It is designed to check the large pieces of text at once (in a separate window). 它旨在一次检查大文本(在单独的窗口中)。

Hope this helps. 希望这可以帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM