memcode icon indicating copy to clipboard operation
memcode copied to clipboard

Performance with a lot of Quill editors

Open lakesare opened this issue 3 years ago • 3 comments

Multiple users reported diminished performance when dealing with 100+ flashcards. It has been partially fixed by loading the flashcards in batches of 20 flashcards, - but this fix still staggers performance and even introduces editing issues reportedly. See https://github.com/quilljs/quill/issues/627, https://github.com/quilljs/quill/issues/2149, https://github.com/quilljs/quill/issues/1482.

Possible solutions:

  • Switch from Quill to some other text editor - maybe something react-specific, I remember I enjoyed https://github.com/ianstormtaylor/slate. Switching is nice, but it's likely to take quite some time, - and migration of existing flashcards may be difficult.
  • Only load the flashcard once you click on it. May be fast to implement and nice to use.

Perfect solution:

  • Solve the Quill performance issue directly.

lakesare avatar Aug 12 '20 00:08 lakesare

Have you considered using something like a quill html renderer to display the flashcard, and load React-Quill when the user wants to edit the contents?

nichwch avatar Dec 19 '20 10:12 nichwch

@nichwch, we actually do something of a kind already - we lazy load batches of flashcards (first all 100 flashcards are displayed as html, then 10 by 10 they get converted to Quill). The solution you propose would require the user to click the flashcard twice in order to edit it.


However I think we've dealt with this issue indirectly - since we started rendering the new flashcard on top users don't seem to notice that other flashcards haven't yet loaded. Do you still experience some lagging?

lakesare avatar Dec 19 '20 17:12 lakesare

apologies, i'm using quill in a personal project and mistook this for a Quill issue - i see now that this is for the memcode product. i'm not a user, i can't speak to whether your site lags

sorry for the confusion

nichwch avatar Dec 19 '20 20:12 nichwch