-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Browser crashes when we try to copy/paste data from spreadsheet #449
Comments
Maybe same bug: paste content to Ckeditor 4.7.0 inline editor crashes the editor. More specifically: editor disappears and only pasted content is showing. |
@hponka, does it happen when pasting content from Excel or just regular content? If it is an issue with regular copy/paste, I would ask you to report a separate issue with reproduction steps. |
@f1ames, it happen with regular content. |
@hponka could you provide more examples? I mean like source docx / xlsx files - also env would be helpful (os, browser, office verison). |
@f1ames Not yet. The bug happened with full preset and many extra plugins. Need to test more - without extra plugins and with basic preset. |
On a side note: in fact obtaining data from clipboard might be a serious bottleneck. I recall playing around with fetching rtf, which take 20mb or more in real documents. Unfortunately it locks the main thread, and can't be processed in web worker due to security reasons. I know there was some movement with new asynchronous clipboard api, but I'd assume it's not going to be a reality soon, since even today regular clipboard api still has some implementation gaps between the browsers. @f1ames the most important thing is to ensure that only required data type is cached (here text/html). Under any condition rtf should not be fetched unless required (which is not ATM). But then again... clipboard api (thus data transfer) is not supported on IE11 and it still breaks the browser... |
@f1ames
But it doesn't happens with Ckeditor 4.7.0 basic preset. So the bug must be in some plugin which is included in the full preset but not in basic. |
Thanks for the details @hponka. Would it be possible for you to report it as a separate issue so we can proceed it separately from this one? |
@f1ames Buggy plugin is tableselection. When I remove it the bug not happen. |
@mlewand More than half of the execution time in There is a room for improvement for sure, but this is a separate issue not connected to |
To test PFW performance I temporarily removed all code accessing Without PFW pasting whole table takes few seconds. Memory allocation profile: It looks like processing html in the |
Digging deeper (using Chrome profiling tools which are more convenient than IE ones) it looks like the cause of the browser freeze/slowdown is not in a one place, but in a few places. As the data in the clipboard is quite big ( The The The last one is the filter call triggered by We may try to optimize each of those places separately or think of more general solution for pasting big sets of data (not really sure what it could be). I looked also into IE11/Edge and was able to paste only 500 rows table (the whole document has about 1700 rows) without hanging the browser, but the call stack looked similar to the one in Chrome. So it seems as a more complex problem than optimizing one bottleneck. |
Tested with plain contenteditable: Which means in Chrome and FF it is a CKEditor code which adds the whole overheat (as described in a previous comments). However, for IE11 and Edge there is some initial overheat already, so even if with optimise processing of pasted content it will still take a substantial amount of time in IE11 and especially Edge. Reported Edge issue https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/12514691/. |
@mlewand should we mark it as wontfix or we will get back to it some day? |
Let's leave it open and we'll revisit it in the future. |
Hi, Seeing this issue is already 2+ years old, what suggestion do you guys have to improve on this? I do use ckeditor5, but I am getting complains that an large amount of text can't be copied without the browser complaining about a slow page and asking the user to force-quit the tab (Chrome). How do I solve this? First part I press enter. Then you see a pause. Then I try to write "Test". Insanely long. I can understand a little bit that coping might take long, then a workaround would be to copy it in parts. But unfortunately after all text is copied it still produces issues like mentioned above. |
Hello @Ruud-cb!
Does your issue concerns CKEditor 4 or CKEditor 5? If it's about CKEditor 5, please report to https://github.com/ckeditor/ckeditor5. As for CKEditor 4, we haven't been able to make any visible improvements regarding this issue. This is a complex one, since it's partially browser native issue (there is a slowdown when using plain |
Hi @f1ames, yes it's CKeditor5 I am using, just commenting here because there is already a large discussion happened here and the #1 google search result. Sorry to hear that you have not found any solution so far. I will do some more research myself for the default and other HTML-editors to see if that changes something. If it does then I guess I will open a new issue at CKeditor5's repo. |
@Ruud-cb feel free to share any findings here too, so we may think about some fixes based on that 👍 |
Are you reporting a feature or a bug?
Bug
Provide detailed reproduction steps (if any)
Use ie_data.zip
Expected result
Content is pasted properly without freezing a browser or throwing errors.
Actual result
Other details
The text was updated successfully, but these errors were encountered: