Hi, I’m new to prosemirror, and have to deal with some big document (~5 megabytes of utf8 txt) with it. The structure of document is rather simple, just a list of n x 10000 paragraphs/lines. When it is loaded into an prosemirror editor, editing becomes slow.
I find that one hot spot is iterDeco(…) in prosemirror-view. In iterDeco() the code seems have to iterate over the whole list of contents to find matching ones. I was wondering is it possible to optimize this procedure with intersection observer api? so that we can limit the iteration range down to leaf nodes being shown in the viewport and selection.
Thanks for making this awesome editor!