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

Fixes nav start argument in user timing check #8348

Merged
merged 1 commit into from
Aug 13, 2019
Merged

Fixes nav start argument in user timing check #8348

merged 1 commit into from
Aug 13, 2019

Conversation

housseindjirdeh
Copy link
Collaborator

Fixes #8347

null isn't supported for startMark in performance.measure for IE11 and Safari. This PR switches it to the navigationStart PerformanceTiming property

@housseindjirdeh housseindjirdeh changed the title fixes nav start argument in user timing check Fixes nav start argument in user timing check Aug 13, 2019
Copy link
Member

@Timer Timer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No test needed since canary is already failing without this! 👍

@Timer Timer added this to the 9.0.4 milestone Aug 13, 2019
@ijjk
Copy link
Member

ijjk commented Aug 13, 2019

Stats from current PR

Default Server Mode

General
zeit/next.js canary housseindjirdeh/next.js fix-navigation-start-metric Change
buildDuration 22.8s 22.3s -480ms
nodeModulesSize 41.5 MB 41.5 MB ⚠️ +42 B
Client Bundles (main, webpack, commons) ⚠️ Overall increase ⚠️
zeit/next.js canary housseindjirdeh/next.js fix-navigation-start-metric Change
main-HASH.js 13.8 kB 13.8 kB ⚠️ +13 B
main-HASH.js gzip 4.86 kB 4.87 kB ⚠️ +9 B
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
commons.HASH.js 194 kB 194 kB
commons.HASH.js gzip 63.1 kB 63.1 kB
Overall change ⚠️ +13 B
Client Bundles (main, webpack, commons) Modern ⚠️ Overall increase ⚠️
zeit/next.js canary housseindjirdeh/next.js fix-navigation-start-metric Change
main-HASH.module.js 11.4 kB 11.4 kB ⚠️ +13 B
main-HASH.module.js gzip 4.3 kB 4.31 kB ⚠️ +8 B
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH.module.js gzip 746 B 746 B
commons.HASH.module.js 175 kB 175 kB
commons.HASH.module.js gzip 57.1 kB 57.1 kB
Overall change ⚠️ +13 B
Client Pages
zeit/next.js canary housseindjirdeh/next.js fix-navigation-start-metric Change
_app.js 1.9 kB 1.9 kB
_app.js gzip 905 B 905 B
_error.js 8.02 kB 8.02 kB
_error.js gzip 3.12 kB 3.12 kB
index.js 343 B 343 B
index.js gzip 237 B 237 B
link.js 4.07 kB 4.07 kB
link.js gzip 1.79 kB 1.79 kB
routerDirect.js 423 B 423 B
routerDirect.js gzip 290 B 290 B
withRouter.js 435 B 435 B
withRouter.js gzip 287 B 286 B -1 B
Overall change
Client Pages Modern
zeit/next.js canary housseindjirdeh/next.js fix-navigation-start-metric Change
_app.module.js 1.79 kB 1.79 kB
_app.module.js gzip 865 B 865 B
_error.module.js 5.82 kB 5.82 kB
_error.module.js gzip 2.33 kB 2.33 kB
index.module.js 319 B 319 B
index.module.js gzip 238 B 238 B
link.module.js 3.78 kB 3.78 kB
link.module.js gzip 1.7 kB 1.7 kB -1 B
routerDirect.module.js 411 B 411 B
routerDirect.module.js gzip 291 B 291 B
withRouter.module.js 423 B 423 B
withRouter.module.js gzip 288 B 288 B
Overall change
Fetched pages
zeit/next.js canary housseindjirdeh/next.js fix-navigation-start-metric Change
link 2.81 kB 2.81 kB
link gzip 848 B 845 B -3 B
index 2.76 kB 2.76 kB
index gzip 838 B 841 B ⚠️ +3 B
withRouter 2.82 kB 2.82 kB
withRouter gzip 837 B 837 B
Overall change

Diffs

Diff for main-HASH.js
@@ -683,7 +683,7 @@ function markHydrateComplete() {
   if (!_utils.SUPPORTS_PERFORMANCE_USER_TIMING) return;
   performance.mark('afterHydrate'); // mark end of hydration
 
-  performance.measure('Next.js-before-hydration', null, 'beforeRender');
+  performance.measure('Next.js-before-hydration', 'navigationStart', 'beforeRender');
   performance.measure('Next.js-hydration', 'beforeRender', 'afterHydrate');
   clearMarks();
 }
Diff for main-HASH.module.js
@@ -565,7 +565,7 @@ function markHydrateComplete() {
   if (!_utils.SUPPORTS_PERFORMANCE_USER_TIMING) return;
   performance.mark('afterHydrate'); // mark end of hydration
 
-  performance.measure('Next.js-before-hydration', null, 'beforeRender');
+  performance.measure('Next.js-before-hydration', 'navigationStart', 'beforeRender');
   performance.measure('Next.js-hydration', 'beforeRender', 'afterHydrate');
   clearMarks();
 }

Serverless Mode

General
zeit/next.js canary housseindjirdeh/next.js fix-navigation-start-metric Change
buildDuration 25s 24.3s -701ms
nodeModulesSize 41.5 MB 41.5 MB ⚠️ +42 B
Client Bundles (main, webpack, commons) ⚠️ Overall increase ⚠️
zeit/next.js canary housseindjirdeh/next.js fix-navigation-start-metric Change
main-HASH.js 13.8 kB 13.8 kB ⚠️ +13 B
main-HASH.js gzip 4.86 kB 4.87 kB ⚠️ +9 B
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
commons.HASH.js 194 kB 194 kB
commons.HASH.js gzip 63.1 kB 63.1 kB
Overall change ⚠️ +13 B
Client Bundles (main, webpack, commons) Modern ⚠️ Overall increase ⚠️
zeit/next.js canary housseindjirdeh/next.js fix-navigation-start-metric Change
main-HASH.module.js 11.4 kB 11.4 kB ⚠️ +13 B
main-HASH.module.js gzip 4.3 kB 4.31 kB ⚠️ +8 B
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH.module.js gzip 746 B 746 B
commons.HASH.module.js 175 kB 175 kB
commons.HASH.module.js gzip 57.1 kB 57.1 kB
Overall change ⚠️ +13 B
Client Pages
zeit/next.js canary housseindjirdeh/next.js fix-navigation-start-metric Change
_app.js 1.9 kB 1.9 kB
_app.js gzip 905 B 905 B
_error.js 8.02 kB 8.02 kB
_error.js gzip 3.12 kB 3.12 kB
index.js 343 B 343 B
index.js gzip 237 B 237 B
link.js 4.07 kB 4.07 kB
link.js gzip 1.79 kB 1.79 kB
routerDirect.js 423 B 423 B
routerDirect.js gzip 290 B 290 B
withRouter.js 435 B 435 B
withRouter.js gzip 287 B 287 B
Overall change
Client Pages Modern
zeit/next.js canary housseindjirdeh/next.js fix-navigation-start-metric Change
_app.module.js 1.79 kB 1.79 kB
_app.module.js gzip 865 B 865 B
_error.module.js 5.82 kB 5.82 kB
_error.module.js gzip 2.33 kB 2.33 kB
index.module.js 319 B 319 B
index.module.js gzip 238 B 238 B
link.module.js 3.78 kB 3.78 kB
link.module.js gzip 1.7 kB 1.7 kB
routerDirect.module.js 411 B 411 B
routerDirect.module.js gzip 291 B 291 B
withRouter.module.js 423 B 423 B
withRouter.module.js gzip 288 B 288 B
Overall change
Serverless bundles
zeit/next.js canary housseindjirdeh/next.js fix-navigation-start-metric Change
_error.js 247 kB 247 kB
_error.js gzip 66.2 kB 66.2 kB -1 B
index.js 247 kB 247 kB
index.js gzip 66.5 kB 66.5 kB
link.js 255 kB 255 kB
link.js gzip 68.7 kB 68.7 kB -1 B
routerDirect.js 248 kB 248 kB
routerDirect.js gzip 66.4 kB 66.4 kB -1 B
withRouter.js 248 kB 248 kB
withRouter.js gzip 66.5 kB 66.5 kB -1 B
Overall change

@Timer Timer merged commit 55ccb09 into vercel:canary Aug 13, 2019
@dan-fein
Copy link
Contributor

Is this available in the latest? 9.0.5?

@Timer
Copy link
Member

Timer commented Aug 27, 2019

Yes.

@vercel vercel locked as resolved and limited conversation to collaborators Feb 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Safari raises SyntaxError: The string did not match the expected pattern.
4 participants