Paste performance for large images #10287
Labels
intro
Good first ticket.
squad:core
Issue to be handled by the Core team.
type:bug
This issue reports a buggy (incorrect) behavior.
Milestone
📝 Provide detailed reproduction steps (if any)
You can increase paste performance in Chrome with a very simple optimization.
Due to missing caching in DataTransfer's implementation in Chrome (see bug report here), accessing the files propery is expensive.
On my fairly fast MacBook Pro 2017 (2,8 GHz Intel Core i7, 16 Gigs of memory) it takes abount 1 second to read the files collection of the DataTransfer object if I paste an image with a size of approx. 17 MB. So the paste operation takes about 2 seconds in CKEditor 5.
If you avoid accessing the files collection more than once, you can halve the time.
The test was performed on the official online demo:
https://ckeditor.com/ckeditor-5/demo/
A similar bug report has been filed for CKEditor 4:
ckeditor/ckeditor4#4807
-- Although the problem is much more noticable in v4 since the files collection is being accessed multiple times.
In CKEditor 5 this is a minor problem since the collection is only accessed twice. But it's also easy to fix to give us a noticable performance improvement for large images.
✔️ Expected result
What is the expected result of the above steps?
❌ Actual result
What is the actual result of the above steps?
❓ Possible solution
If you have ideas, you can list them here. Otherwise, you can delete this section.
📃 Other details
If you'd like to see this fixed sooner, add a 👍 reaction to this post.
The text was updated successfully, but these errors were encountered: