-
Notifications
You must be signed in to change notification settings - Fork 75
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
extension: make more resilient against constant page updates #177
Comments
Ugh. Some pages might even triggle multiple onUpdated events with complete=true, e.g. https://github.com/karlicoss/promnesia/projects/1 |
Yes, debounce seems preferable e.g. launch a timer for ~1.2sec and if not any new |
Kind of -- I was thinking more of "fetch the first time, but don't fetch the next times". Otherwise you'd always get a 1 second lag after loading page. Basically I think querying visits is okay (it's fast anyway), the annoying bit is when it causes redrawing the sidebar and promnesia UI -- it can be both slow but also frustrating. So perhaps would be easier to just cancel the query. Another thing to think about is how to cover this with tests -- if we have more complicated logic, we really don't want to break it later. |
Zulip ( |
Looks like #307 fixes it. 6 requests VS 1 |
Hmm, interesting that I can't reproduce the issue on twitter and Zulip anymore -- it seems that they emit perhaps more onUpdated than we wish, but not on every scroll/character typed |
I think that shouldn't be an issue anymore, but feel free to reopen if it still happens |
Some sites (e.g. twitter.com) emit onUpdated all the time when scrolled, which causes constant requests to the backend and redrawing the sidebar.
Might be nice to debounce it or something.
The text was updated successfully, but these errors were encountered: