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

Guard against rapid changes #139

Merged
merged 19 commits into from
Jan 19, 2018
Merged

Guard against rapid changes #139

merged 19 commits into from
Jan 19, 2018

Conversation

matatk
Copy link
Owner

@matatk matatk commented Jan 14, 2018

This implements an adaptive performance adjustment to mitigate against many mutations happening within a short space of time on a page. Details on how this works can be found in #127.

This guards against any changes to the DOM, not just those that get checked and ultimately trigger a scan for landmarks. The reason is that if there are many changes that are not related to landmarks, that could still slow things down.

In support of this, a lot of refactoring and simplification of the content script has occurred.

@matatk matatk force-pushed the guard-against-rapid-changes branch from d8a35ae to 02cbbda Compare January 18, 2018 09:22
* Back off exponentially when getting more mutation events.
* After events stop, decrease the pause linearly.
* Factor out the handling of this into PauseHandler.
* Minor tidy-ups in LandmarksFinder.
* Add option to the options page.
* Tweak spacing on optoins page.
* Add a message for the option name.
* Hook up PauseHandler to the option and changes to it.
* Opera supports the storage.sync object, even though it does not support synching.
* Fixes #132.
* Seems GitHub doesn't render "---" as an em-dash, so revert to the HTML
  character code.
* Update info on the mutation guarding changes.
* Use bold text for the "definition" parts of the keyboard shortcuts,
  and re-word slightly for generality of input devices :-).
* Add notes about the more minor PRs that went into this release.
* To keep the naming consistent.
* To keep alphabetical order matching logical order.
* Use just Error instead of "new Error".
* Remove unused translation message.
* Simplify LandmarksFinder API and rename functions for clarity (they
  are getters). This fixes a bug that was there for ages whereby it was
  not calling the function to check the number of landmarks found (in
  checkFocusElement()).
* Vastly simplify the bootstrapping code in content.overall.js.
* Move Logger to content.overall.js from content.pausing.js and
  generalise.
* Remove Logger from content.pausing.js.
* Disconnect observer if content script has been retired (fixes #131).
* Remove magic numbers in all setTimeout() calls.
* If landmarks might be out-of-date, re-scan when using the button or
  keyboard shortcuts.
* Make injected landmarks test page less verbose.
Oops; had failed to do this right last time :-).
Bind the logging function to the console so that it can correctly work
out where the log message originated.
@matatk matatk force-pushed the guard-against-rapid-changes branch from 02cbbda to b69c4bd Compare January 19, 2018 12:36
@matatk matatk merged commit 2200824 into master Jan 19, 2018
@matatk matatk deleted the guard-against-rapid-changes branch January 19, 2018 13:31
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

Successfully merging this pull request may close these issues.

1 participant