-
-
Notifications
You must be signed in to change notification settings - Fork 344
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
Performance problem with multiple block nodes #911
Comments
FIX: Improve display update times for nodes with thousands of children by fix an accidental piece of quadratic complexity. Issue ProseMirror/prosemirror#911
Ah, oops, that was a case of accidentally quadratic complexity. Could you try if attached patch helps for you? Performance of inline nodes with tons of children is still not super great, but better than before, and it seems that the remaining slowness is largely coming from the browser's layout and redraw code. |
It looks, that you fixed performance for document without decorations. There was a lag at the end of document before. Could you be able to make a fix when decorations are turned on? Here is test environment with applied fix https://glitch.com/edit/#!/slash-celsius?path=index.html:79:6 |
What do you mean by decorations being turned on? Your demo is a bit hard to figure out due to some of the relevant code being hidden in that huge bundle, but when I try to replicate it (a paragraph with lots of nodes, each being separately decorated), I'm not seeing any performance issues. Could you simplify the demo? |
I noticed, that you released prosemirror-view 1.8.9. Here is updated demo(updated to prosemirror-view 1.8.9) https://glitch.com/edit/#!/grizzled-change?path=index.html:134:0 where I made a more comments. I think, that you will be able to reproduce an issue when you will use subtitle_editor_schema.js(because we want to add a attribute into text node -> discussion at #910) and will create decorations on cca 12000 "custom_text" nodes (I created a helper methods for it) |
But when you use a default schema from prosemirror-schema-basic and create cca 12000 paragraphs with at least one text node and will make a decorations for it, than you will see a performance problem during editation too. Demo(with prosemirror-view 1.8.9) for it: https://glitch.com/edit/#!/accidental-slope?path=subtitle_editor.js:6:51 Edit: |
Scenario:
Creation a PM document from a text, where each word of text has a custom attributes, which will be reflected into node attr structure.
Issue details
There is a typing performance / delay issue. Interesting thing is, that there is no performance issue when there is decorated only one custom_text node instead 3000 and more nodes at the same time.
Demo:
https://glitch.com/edit/#!/bronzed-drug?path=index.html:6:27
Related issue:
Because ProseMirror treats text nodes as just plain text, there is need to find workaround (custom nodes) for scenario described above. More at the issue #910
Could you help me with it, please?
Thank you
Vlado
The text was updated successfully, but these errors were encountered: