Fix buggy implementations of the Performance API - #5299
Merged
Merged
Conversation
performance.measure is undefined
|
Size Change: +1.06 kB (0%) Total Size: 1.78 MB
ℹ️ View Unchanged
|
⚡️ Lighthouse report for the changes in this PRLighthouse tested 2 URLs Report for Article
Report for Front
|
oliverlloyd
approved these changes
Jul 4, 2022
oliverlloyd
left a comment
Contributor
There was a problem hiding this comment.
👍 pending tests in code
mxdvl
force-pushed
the
mxdvl/islands-perf
branch
4 times, most recently
from
July 4, 2022 15:34
1c615cb to
be69119
Compare
Many errors have started showing in Sentry since the island performance changes have been introduced: CLIENT-SIDE-PROD-CTP6 We now make guard against these three `performance.` cases: - the browser does not support `getEntriesByName` - the browser does not return a PerformanceEntry from `mark` & `measure` - no PerformanceEntry was found when running `getEntriesByName`
performance.measure is undefined
This file contains hidden or 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
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.
What does this change?
Fallback to returning bogus (no-op) functions on initPerf when
performance.getEntriesByNameis missing.Many errors have started showing in Sentry since the island performance changes have been introduced.
Looking for the existence of
measurein window.performance should be a better indicator of support than simplymark.Why?
The behaviour has been refactored in:
Screenshots