Skip to content
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

Last update made it use enormous amounts of RAM, made it slow #95

Open
snomos opened this issue Sep 16, 2024 · 5 comments
Open

Last update made it use enormous amounts of RAM, made it slow #95

snomos opened this issue Sep 16, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@snomos
Copy link
Member

snomos commented Sep 16, 2024

Feedback from a user:

image

See also:

@snomos snomos added the bug Something isn't working label Sep 16, 2024
@zoomix
Copy link

zoomix commented Sep 26, 2024

We don't really have a lot of control for the memory usage. The extension is basically an iframe that loads our page and has a bunch of hooks to access the document that's being edited.

If we have a lot of errors that are displayed, we need to render very very many elements that hook up to a huge number of paragraphs and sentences and words in the document. That consumes a lot of ram.

When few errors are shown, little ram is used.

Image

When lots of errors are shown, lots of ram is used.
Image

There's two ways to solve this:

  1. I can try and scale down the number of dom elements that are being used and probably get the ram usage way down.

  2. We redo the experience to be more like a wizard - we grammar-check one paragraph at a time.

I actually think it would be better to redo the experience. Grammar-checking a large document (i tried with a chapter of the bible in lule sami), can take a very long time. If we check one paragraph at a time, we would improve the overall user experience - it'd feel faster and use less ram.

Thoughts?

Screen.Recording.2024-09-26.at.15.00.28.mov

@albbas
Copy link
Member

albbas commented Sep 27, 2024

Perhaps a kind of autoscroll? Check the next paragraph when there are only a few errors left to correct.

@albbas
Copy link
Member

albbas commented Sep 27, 2024

With a counter: x of y paragraphs checked

@snomos
Copy link
Member Author

snomos commented Sep 27, 2024

For optimisations see the suggestions in #92 , those are based on a similar plugin for Danish and Greenlandic, and it handles long documents without slowdown. I don't know about RAM consumption, but I would expect it to be well thought out also in that respect.

@TinoDidriksen
Copy link

Just tested Kukkuniiaat sidebar in Word on a 222 page document (49520 words). F12 on the sidebar shows 13 MiB RAM for the JS instance. Task manager shows 80 to 120 MiB for the msedgewebview2.exe process. The same holds for Word Online in Chrome, and Chrome's own task manager agrees with ~100 MiB total.

That still holds when on the See All navigation pane, which shows all 2800 errors in a long list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants