forked from davidtodd/landmarks
-
Notifications
You must be signed in to change notification settings - Fork 7
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
perf: Mutation observation metrics #271
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* When there is a mutation, send info on it to the DevTools panel. * Also send curent pause time (but it is not updated).
This also fixes a bug that was introduced with the rename of the mutation-info message.
In order for the profiling script timestamps to work, a DEBUG build will need to be made. The current debugInfo preference could be used for mutation info and/or info for web devs maybe?
* Also tidy up some commments. * Calculate and send duration of last landmarks scan.
This makes the content script code neater.
This does actually keep the one for content script disconnection on Chrome.
* Content script should check if the DevTools panel is open when it boots up. * The get-devtools-state and devtools-state messages replace devtools-panel-(open|clos)ed. * Add a note to content script about whether the scheduled task bit is needed re PauseHandler. * Clarify PauseHandler param names; send the pause state at start-up; add a TODO. * Add a test page that injects landmarks automatically.
* If the guarded task is done, cancel a scheduled task (need to fully grok when this would occur). * Add more logging back in (will be useful for debugging after #269. * Update MSR class name.
* Revert the cancelling-the-timeout behaviour for PauseHandler as it borks lots of stuff :-) - do need to investigate further, though. * Re-write the MutationStatsReporter using the same format as other Landmarks "classes" - it is more consistent, supports private variables and makes the pauseTime update simpler - of course it is not a real class, but there can only be one (per tab) so it is OK.
* Say when content script is booting. * Say what the test page is doing. This has shown there are some weirdnesses in the start-up behaviour of the mutation-guarding algorithm. It should be easier to diagnose them when #269 is done (though have been using the local page console, with timestamps enabled, as opposed to the Browser Console).
* Update build script to support conditional inclusion of devtools CSS. * Style the mutation observation station. * Use disclosure widgets to provide access to the mutation info and term definitions. Next: i18n and only sending updates when the mutation observation station is open.
matatk
force-pushed
the
look-at-mutation-observation-performance
branch
from
March 7, 2019 10:11
9bea68e
to
1469567
Compare
This also ensures that the run of commits with messages starting "Ensure..." continues :-)
matatk
added a commit
that referenced
this pull request
Mar 19, 2019
As mentioned in #271, this adds support for making debug builds. * Use yargs to improve options-handling in the build script. * Simplify the npm scripts back to building/cleaning the extension for all browsers. * Remove the "build:all:quick" script in favour of just calling the build script directly on the CLI. * Remove the npm clean scripts; most of this is now done in the build script, which now has a clean mode. * Support debug builds (in which console.timeStamp() calls are made). * Update the README accordingly.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Collects information on mutations and sends this to the DevTools panel for display, when the DevTools panel is open.
TODO:
Styling for the DevTools panel (and how to avoid this being repeated in the other GUIs).Styling is now included.What to do about theThis will be tackled in the next PR.debugInfo
preference? Is it needed any more? If not, should code be added to remove it? (Perhaps yes, and that code could then be removed for the next major version?)TODO outside of this PR:
console.timeStamp()
must be called by the extension, and it doesn't seem easy, clean—or maybe possible—to turn on that setting with Puppeteer).