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

Perfomance issues on big page load or config change #15

Open
listvin opened this issue Nov 14, 2023 · 3 comments
Open

Perfomance issues on big page load or config change #15

listvin opened this issue Nov 14, 2023 · 3 comments

Comments

@listvin
Copy link

listvin commented Nov 14, 2023

FF freezes for up to a minute in some scenarios.

A. Long pages, not just infinite scroll. Now I noticed that in this case only first two screens are processed.

  1. sR is enabled, so far so good, there are little tabs for cleaner experiment
  2. Open Wikipedia
  3. Make yourself a coffee or whatever poison you prefer ☕

B. I have lot's of tab opened (50+ i think, in different windows and workspaces, I am not that mad) and something changes, primarily:

  • PC wakes from sleep and I move to FF. It was the last active app before suspend, so should not be swap-related.
  • sR is toggled on or off. Toggling off is especially frustrating after encounter with long page.
  • Dark Reader switched on/off. Note that DR on itself with sR disabled does not cause any issue on its own.

FF on Linux Mint 21 Cinnamon on desktop with i5 6th gen and 50GB RAM. Only 20% free at the moment and some swap used tho 🤔 Nothing bothers CPU during experiments, but experiment itself causes 100% spike on all cores.

@listvin
Copy link
Author

listvin commented Nov 14, 2023

Suggestion for case B -- it seems FF in mentioned situations lightly refreshes all loaded pages. Probably it's possible to do some check if page is open or before applying/reapplying transformation? Not sure if DR does this, probably its' CSS manipulations are free relatively to raping DOM with thousands of tiny objects. Such check of page presence might be simple to implement

@listvin
Copy link
Author

listvin commented Nov 14, 2023

Suggestion for case A -- manipulate only text blocks that are currently in the viewport +50% above/below. Might automatically improve case B a little.

@listvin
Copy link
Author

listvin commented Nov 14, 2023

Idea for case B.ii.
When big page is already smart-read and extension becomes disabled, don't make any changes to DOM at all, just change CSS for .smart-readerBold class to empty style. Probably we need non-intrusive pop-up with buttons "refresh page" and "fix page", the latter does unraping thingie, even if it takes time, the user is more aware of consequences. Not having "fix" button is bad, in case user disables ext due to broken page with resubmission-sensitive content

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant