ckeditor / ckeditor4

The best enterprise-grade WYSIWYG editor. Fully customizable with countless features and plugins.

Home Page:https://ckeditor.com/ckeditor-4

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Memory leak in Source Code Editing when having thousand of words

syhrimr opened this issue · comments

Type of report

Bug

Provide detailed reproduction steps (if any)

  1. Go to https://ckeditor.com/docs/ckeditor4/latest/examples/sourcearea.html
  2. In either source code area or dialog, input a long content. In here I input a around 5,9k words long content with images and computed style texts. You can put this code that I used to reproduce the issue https://codepen.io/syhrimr/pen/JjeGVgo

image
3. Check the dev tools and there will be an error

Error: attribute viewBox: Expected number, "0 0 100% 4".

Expected result

Fixed the error and memory leak.

Actual result

In my case, since the content is long, the error occurs more than 20k times and causes memory leak.

image
image

Other details

  • Browser: Microsoft Edge version 114.0.1823.43 (Official build) (64-bit)
  • OS: Windows 10 Pro 10.0.19044
  • CKEditor version: 4.13.12 and 4.21.0
  • Installed CKEditor plugins: Standard Plugins

Could you provide a content used for the reproduction?

@Comandeer here the content code that used for reproduction, I put it on Codepen https://codepen.io/syhrimr/pen/JjeGVgo

I'm not able to reproduce the error. I've tried pasting the content into the CKEditor 4 sample and the browser's console does not show any error connected to SVG.

Okay, so I found the root cause. The memory leak was coming from my browser extensions Microsoft Editor: Spelling and Grammar. Seems it got a bug with the error I reported above coming from it and aggressively check every text in the RTE.