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

Remove Flying Shuttle experiment #8433

Merged
merged 6 commits into from
Aug 20, 2019
Merged

Conversation

Timer
Copy link
Member

@Timer Timer commented Aug 20, 2019

Removes a lot of maintenance burden for something we're no longer invested in.

@Timer Timer added this to the 9.0.5 milestone Aug 20, 2019
@ijjk
Copy link
Member

ijjk commented Aug 20, 2019

Stats from current PR

Default Server Mode (Decrease detected ✓)
General Overall decrease ✓
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
buildDuration 28.5s 27.1s -1.4s
nodeModulesSize 41.3 MB 41.2 MB -66 kB
Client Bundles (main, webpack, commons) Overall decrease ✓
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
main-HASH.js 17.9 kB 17.8 kB -107 B
main-HASH.js gzip 6.56 kB 6.54 kB -22 B
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
commons.HASH.js 190 kB 190 kB
commons.HASH.js gzip 61.6 kB 61.6 kB
Overall change -107 B
Client Bundles (main, webpack, commons) Modern Overall decrease ✓
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
main-HASH.module.js 16.2 kB 16.1 kB -61 B
main-HASH.module.js gzip 6.28 kB 6.27 kB -9 B
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH.module.js gzip 746 B 746 B
commons.HASH.module.js 171 kB 171 kB
commons.HASH.module.js gzip 55.4 kB 55.4 kB
Overall change -61 B
Client Pages
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
_app.js 1.9 kB 1.9 kB
_app.js gzip 905 B 905 B
_error.js 12.1 kB 12.1 kB
_error.js gzip 4.76 kB 4.76 kB
hooks.js 1.06 kB 1.06 kB
hooks.js gzip 600 B 600 B
index.js 343 B 343 B
index.js gzip 237 B 237 B
link.js 8.13 kB 8.13 kB
link.js gzip 3.49 kB 3.49 kB
routerDirect.js 429 B 429 B
routerDirect.js gzip 292 B 292 B
withRouter.js 439 B 439 B
withRouter.js gzip 290 B 290 B
Overall change
Client Pages Modern
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
_app.module.js 1.79 kB 1.79 kB
_app.module.js gzip 865 B 865 B
_error.module.js 10.6 kB 10.6 kB
_error.module.js gzip 4.31 kB 4.31 kB
hooks.module.js 596 B 596 B
hooks.module.js gzip 354 B 354 B
index.module.js 319 B 319 B
index.module.js gzip 238 B 238 B
link.module.js 8.52 kB 8.52 kB
link.module.js gzip 3.67 kB 3.67 kB
routerDirect.module.js 417 B 417 B
routerDirect.module.js gzip 292 B 292 B
withRouter.module.js 427 B 427 B
withRouter.module.js gzip 291 B 291 B
Overall change
Fetched pages Overall decrease ✓
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
link 2.8 kB 2.78 kB -23 B
link gzip 850 B 833 B -17 B
index 2.75 kB 2.73 kB -23 B
index gzip 842 B 824 B -18 B
withRouter 2.81 kB 2.79 kB -23 B
withRouter gzip 838 B 823 B -15 B
Overall change -69 B

Diffs

Diff for main-HASH.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[9],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[2],{
 
 /***/ "/h46":
 /***/ (function(module, exports, __webpack_require__) {
@@ -343,7 +343,6 @@ var props = data.props,
     page = data.page,
     query = data.query,
     buildId = data.buildId,
-    dynamicBuildId = data.dynamicBuildId,
     assetPrefix = data.assetPrefix,
     runtimeConfig = data.runtimeConfig,
     dynamicIds = data.dynamicIds;
@@ -516,8 +515,6 @@ function () {
             return window.__NEXT_PRELOADREADY(dynamicIds);
 
           case 22:
-            if (false) {}
-
             exports.router = router = (0, _router.createRouter)(page, query, asPath, {
               initialProps: props,
               pageLoader: pageLoader,
@@ -548,7 +545,7 @@ function () {
             render(renderCtx);
             return _context.abrupt("return", emitter);
 
-          case 27:
+          case 26:
           case "end":
             return _context.stop();
         }
@@ -1435,8 +1432,6 @@ var PageLoader =
 /*#__PURE__*/
 function () {
   function PageLoader(buildId, assetPrefix) {
-    var _this3 = this;
-
     _classCallCheck(this, PageLoader);
 
     this.buildId = buildId;
@@ -1444,9 +1439,6 @@ function () {
     this.pageCache = {};
     this.pageRegisterEvents = (0, _mitt["default"])();
     this.loadingRoutes = {};
-    this.promisedBuildId = _promise["default"].resolve();
-
-    if (false) {}
 
     if (false) {}
   } // Returns a promise for the dependencies for a particular route
@@ -1475,7 +1467,7 @@ function () {
   }, {
     key: "loadPage",
     value: function loadPage(route) {
-      var _this4 = this;
+      var _this3 = this;
 
       route = this.normalizeRoute(route);
       return new _promise["default"](function (resolve, reject) {
@@ -1483,9 +1475,9 @@ function () {
           var error = _ref.error,
               page = _ref.page;
 
-          _this4.pageRegisterEvents.off(route, fire);
+          _this3.pageRegisterEvents.off(route, fire);
 
-          delete _this4.loadingRoutes[route];
+          delete _this3.loadingRoutes[route];
 
           if (error) {
             reject(error);
@@ -1495,7 +1487,7 @@ function () {
         }; // If there's a cached version of the page, let's use it.
 
 
-        var cachedPage = _this4.pageCache[route];
+        var cachedPage = _this3.pageCache[route];
 
         if (cachedPage) {
           var error = cachedPage.error,
@@ -1505,7 +1497,7 @@ function () {
         } // Register a listener to get the page
 
 
-        _this4.pageRegisterEvents.on(route, fire); // If the page is loading via SSR, we need to wait for it
+        _this3.pageRegisterEvents.on(route, fire); // If the page is loading via SSR, we need to wait for it
         // rather downloading it again.
 
 
@@ -1513,11 +1505,11 @@ function () {
           return;
         }
 
-        if (!_this4.loadingRoutes[route]) {
+        if (!_this3.loadingRoutes[route]) {
           if (false) {} else {
-            _this4.loadRoute(route);
+            _this3.loadRoute(route);
 
-            _this4.loadingRoutes[route] = true;
+            _this3.loadingRoutes[route] = true;
           }
         }
       });
@@ -1535,22 +1527,13 @@ function () {
           while (1) {
             switch (_context.prev = _context.next) {
               case 0:
-                if (true) {
-                  _context.next = 3;
-                  break;
-                }
-
-                _context.next = 3;
-                return _this.promisedBuildId;
-
-              case 3:
                 route = _this.normalizeRoute(route);
                 scriptRoute = route === '/' ? '/index.js' : route + ".js";
                 url = _this.assetPrefix + "/_next/static/" + encodeURIComponent(_this.buildId) + "/pages" + scriptRoute;
 
                 _this.loadScript(url, route, true);
 
-              case 7:
+              case 4:
               case "end":
                 return _context.stop();
             }
@@ -1561,7 +1544,7 @@ function () {
   }, {
     key: "loadScript",
     value: function loadScript(url, route, isPage) {
-      var _this5 = this;
+      var _this4 = this;
 
       var script = document.createElement('script');
 
@@ -1579,7 +1562,7 @@ function () {
         var error = new Error("Error loading script " + url);
         error.code = 'PAGE_LOAD_ERROR';
 
-        _this5.pageRegisterEvents.emit(route, {
+        _this4.pageRegisterEvents.emit(route, {
           error: error
         });
       };
@@ -1590,7 +1573,7 @@ function () {
   }, {
     key: "registerPage",
     value: function registerPage(route, regFn) {
-      var _this6 = this;
+      var _this5 = this;
 
       var register = function register() {
         try {
@@ -1598,21 +1581,21 @@ function () {
               error = _regFn.error,
               page = _regFn.page;
 
-          _this6.pageCache[route] = {
+          _this5.pageCache[route] = {
             error: error,
             page: page
           };
 
-          _this6.pageRegisterEvents.emit(route, {
+          _this5.pageRegisterEvents.emit(route, {
             error: error,
             page: page
           });
         } catch (error) {
-          _this6.pageCache[route] = {
+          _this5.pageCache[route] = {
             error: error
           };
 
-          _this6.pageRegisterEvents.emit(route, {
+          _this5.pageRegisterEvents.emit(route, {
             error: error
           });
         }
@@ -1635,15 +1618,6 @@ function () {
           while (1) {
             switch (_context2.prev = _context2.next) {
               case 0:
-                if (true) {
-                  _context2.next = 3;
-                  break;
-                }
-
-                _context2.next = 3;
-                return _this2.promisedBuildId;
-
-              case 3:
                 route = _this2.normalizeRoute(route);
                 scriptRoute = (route === '/' ? '/index' : route) + ".js";
 
@@ -1655,68 +1629,68 @@ function () {
                 // its own deduping mechanism.
 
                 if (!document.querySelector("link[rel=\"preload\"][href^=\"" + url + "\"], script[data-next-page=\"" + route + "\"]")) {
-                  _context2.next = 9;
+                  _context2.next = 6;
                   break;
                 }
 
                 return _context2.abrupt("return");
 
-              case 9:
+              case 6:
                 if (!(cn = navigator.connection)) {
-                  _context2.next = 12;
+                  _context2.next = 9;
                   break;
                 }
 
                 if (!((cn.effectiveType || '').indexOf('2g') !== -1 || cn.saveData)) {
-                  _context2.next = 12;
+                  _context2.next = 9;
                   break;
                 }
 
                 return _context2.abrupt("return");
 
-              case 12:
+              case 9:
                 if (true) {
-                  _context2.next = 18;
+                  _context2.next = 15;
                   break;
                 }
 
                 ;
-                _context2.next = 16;
+                _context2.next = 13;
                 return _this2.getDependencies(route);
 
-              case 16:
+              case 13:
                 _context2.t0 = function (url) {
                   _this2.prefetch(url, true);
                 };
 
                 _context2.sent.forEach(_context2.t0);
 
-              case 18:
+              case 15:
                 if (!hasPreload) {
-                  _context2.next = 21;
+                  _context2.next = 18;
                   break;
                 }
 
                 preloadScript(url);
                 return _context2.abrupt("return");
 
-              case 21:
+              case 18:
                 if (!isDependency) {
-                  _context2.next = 23;
+                  _context2.next = 20;
                   break;
                 }
 
                 return _context2.abrupt("return");
 
-              case 23:
+              case 20:
                 if (!(document.readyState === 'complete')) {
-                  _context2.next = 27;
+                  _context2.next = 24;
                   break;
                 }
 
                 return _context2.abrupt("return", _this2.loadPage(route)["catch"](function () {}));
 
-              case 27:
+              case 24:
                 return _context2.abrupt("return", new _promise["default"](function (resolve) {
                   window.addEventListener('load', function () {
                     _this2.loadPage(route).then(function () {
@@ -1727,7 +1701,7 @@ function () {
                   });
                 }));
 
-              case 28:
+              case 25:
               case "end":
                 return _context2.stop();
             }
Diff for main-HASH.module.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[9],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[2],{
 
 /***/ "+oT+":
 /***/ (function(module, exports, __webpack_require__) {
@@ -416,7 +416,6 @@ const {
   page,
   query,
   buildId,
-  dynamicBuildId,
   assetPrefix,
   runtimeConfig,
   dynamicIds
@@ -531,8 +530,6 @@ function () {
       yield window.__NEXT_PRELOADREADY(dynamicIds);
     }
 
-    if (false) {}
-
     exports.router = router = (0, _router.createRouter)(page, query, asPath, {
       initialProps: props,
       pageLoader,
@@ -1351,9 +1348,6 @@ class PageLoader {
     this.pageCache = {};
     this.pageRegisterEvents = (0, _mitt.default)();
     this.loadingRoutes = {};
-    this.promisedBuildId = _promise.default.resolve();
-
-    if (false) {}
 
     if (false) {}
   } // Returns a promise for the dependencies for a particular route
@@ -1424,8 +1418,6 @@ class PageLoader {
     var _this = this;
 
     return (0, _asyncToGenerator2.default)(function* () {
-      if (false) {}
-
       route = _this.normalizeRoute(route);
       let scriptRoute = route === '/' ? '/index.js' : route + ".js";
       const url = _this.assetPrefix + "/_next/static/" + encodeURIComponent(_this.buildId) + "/pages" + scriptRoute;
@@ -1493,8 +1485,6 @@ class PageLoader {
     var _this2 = this;
 
     return (0, _asyncToGenerator2.default)(function* () {
-      if (false) {}
-
       route = _this2.normalizeRoute(route);
       let scriptRoute = (route === '/' ? '/index' : route) + ".js";
Diff for _app.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[2],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[3],{
 
 /***/ "B5Ud":
 /***/ (function(module, exports, __webpack_require__) {
Diff for _error.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[3],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[4],{
 
 /***/ "+iuc":
 /***/ (function(module, exports, __webpack_require__) {
Diff for hooks.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[4],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[5],{
 
 /***/ "+MDD":
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
Diff for index.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[5],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[6],{
 
 /***/ "RNiq":
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
Diff for link.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[6],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[7],{
 
 /***/ "/h46":
 /***/ (function(module, exports, __webpack_require__) {
Diff for routerDirect.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[7],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[8],{
 
 /***/ "LtRI":
 /***/ (function(module, exports, __webpack_require__) {
Diff for withRouter.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[8],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[9],{
 
 /***/ "0Hlz":
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
Diff for _app.module.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[2],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[3],{
 
 /***/ "+oT+":
 /***/ (function(module, exports, __webpack_require__) {
Diff for _error.module.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[3],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[4],{
 
 /***/ "+iuc":
 /***/ (function(module, exports, __webpack_require__) {
Diff for hooks.module.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[4],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[5],{
 
 /***/ "+MDD":
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
Diff for index.module.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[5],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[6],{
 
 /***/ "RNiq":
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
Diff for link.module.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[6],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[7],{
 
 /***/ "/h46":
 /***/ (function(module, exports, __webpack_require__) {
Diff for routerDirect.module.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[7],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[8],{
 
 /***/ "LtRI":
 /***/ (function(module, exports, __webpack_require__) {
Diff for withRouter.module.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[8],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[9],{
 
 /***/ "0Hlz":
 /***/ (function(module, __webpack_exports__, __webpack_require__) {

Serverless Mode (Decrease detected ✓)
General Overall decrease ✓
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
buildDuration 29.2s 29.1s -31ms
nodeModulesSize 41.3 MB 41.2 MB -66 kB
Client Bundles (main, webpack, commons) Overall decrease ✓
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
main-HASH.js 17.9 kB 17.8 kB -107 B
main-HASH.js gzip 6.56 kB 6.54 kB -22 B
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
commons.HASH.js 190 kB 190 kB
commons.HASH.js gzip 61.6 kB 61.6 kB
Overall change -107 B
Client Bundles (main, webpack, commons) Modern Overall decrease ✓
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
main-HASH.module.js 16.2 kB 16.1 kB -61 B
main-HASH.module.js gzip 6.28 kB 6.27 kB -10 B
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH.module.js gzip 746 B 746 B
commons.HASH.module.js 171 kB 171 kB
commons.HASH.module.js gzip 55.4 kB 55.4 kB
Overall change -61 B
Client Pages
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
_app.js 1.9 kB 1.9 kB
_app.js gzip 905 B 905 B
_error.js 12.1 kB 12.1 kB
_error.js gzip 4.76 kB 4.76 kB
hooks.js 1.06 kB 1.06 kB
hooks.js gzip 600 B 601 B ⚠️ +1 B
index.js 343 B 343 B
index.js gzip 237 B 237 B
link.js 8.13 kB 8.13 kB
link.js gzip 3.49 kB 3.49 kB -1 B
routerDirect.js 429 B 429 B
routerDirect.js gzip 292 B 292 B
withRouter.js 439 B 439 B
withRouter.js gzip 290 B 289 B -1 B
Overall change
Client Pages Modern
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
_app.module.js 1.79 kB 1.79 kB
_app.module.js gzip 865 B 865 B
_error.module.js 10.6 kB 10.6 kB
_error.module.js gzip 4.31 kB 4.31 kB
hooks.module.js 596 B 596 B
hooks.module.js gzip 354 B 354 B
index.module.js 319 B 319 B
index.module.js gzip 238 B 238 B
link.module.js 8.52 kB 8.52 kB
link.module.js gzip 3.67 kB 3.67 kB
routerDirect.module.js 417 B 417 B
routerDirect.module.js gzip 292 B 292 B
withRouter.module.js 427 B 427 B
withRouter.module.js gzip 291 B 291 B
Overall change
Serverless bundles Overall decrease ✓
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
_error.js 247 kB 247 kB -730 B
_error.js gzip 66.3 kB 66.3 kB -4 B
hooks.html 2.87 kB 2.85 kB -23 B
hooks.html gzip 868 B 853 B -15 B
index.js 248 kB 247 kB -855 B
index.js gzip 66.6 kB 66.4 kB -252 B
link.js 255 kB 254 kB -855 B
link.js gzip 68.8 kB 68.7 kB -88 B
routerDirect.js 248 kB 248 kB -855 B
routerDirect.js gzip 66.5 kB 66.5 kB -72 B
withRouter.js 248 kB 247 kB -855 B
withRouter.js gzip 66.6 kB 66.5 kB -79 B
Overall change -4.17 kB

@ijjk
Copy link
Member

ijjk commented Aug 20, 2019

Stats from current PR

Default Server Mode (Decrease detected ✓)
General Overall decrease ✓
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
buildDuration 25.1s 24.8s -328ms
nodeModulesSize 41.3 MB 41.2 MB -67.5 kB
Client Bundles (main, webpack, commons) Overall decrease ✓
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
main-HASH.js 17.9 kB 17.8 kB -107 B
main-HASH.js gzip 6.56 kB 6.54 kB -22 B
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
commons.HASH.js 190 kB 190 kB
commons.HASH.js gzip 61.6 kB 61.6 kB
Overall change -107 B
Client Bundles (main, webpack, commons) Modern Overall decrease ✓
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
main-HASH.module.js 16.2 kB 16.1 kB -61 B
main-HASH.module.js gzip 6.28 kB 6.27 kB -9 B
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH.module.js gzip 746 B 746 B
commons.HASH.module.js 171 kB 171 kB
commons.HASH.module.js gzip 55.4 kB 55.4 kB
Overall change -61 B
Client Pages
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
_app.js 1.9 kB 1.9 kB
_app.js gzip 905 B 905 B
_error.js 12.1 kB 12.1 kB
_error.js gzip 4.76 kB 4.76 kB
hooks.js 1.06 kB 1.06 kB
hooks.js gzip 600 B 600 B
index.js 343 B 343 B
index.js gzip 237 B 237 B
link.js 8.13 kB 8.13 kB
link.js gzip 3.49 kB 3.49 kB
routerDirect.js 429 B 429 B
routerDirect.js gzip 292 B 292 B
withRouter.js 439 B 439 B
withRouter.js gzip 290 B 290 B
Overall change
Client Pages Modern
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
_app.module.js 1.79 kB 1.79 kB
_app.module.js gzip 865 B 865 B
_error.module.js 10.6 kB 10.6 kB
_error.module.js gzip 4.31 kB 4.31 kB
hooks.module.js 596 B 596 B
hooks.module.js gzip 354 B 354 B
index.module.js 319 B 319 B
index.module.js gzip 238 B 238 B
link.module.js 8.52 kB 8.52 kB
link.module.js gzip 3.67 kB 3.67 kB
routerDirect.module.js 417 B 417 B
routerDirect.module.js gzip 292 B 292 B
withRouter.module.js 427 B 427 B
withRouter.module.js gzip 291 B 291 B
Overall change
Fetched pages Overall decrease ✓
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
link 2.8 kB 2.78 kB -23 B
link gzip 850 B 834 B -16 B
index 2.75 kB 2.73 kB -23 B
index gzip 842 B 826 B -16 B
withRouter 2.81 kB 2.79 kB -23 B
withRouter gzip 837 B 821 B -16 B
Overall change -69 B

Diffs

Diff for main-HASH.js
@@ -343,7 +343,6 @@ var props = data.props,
     page = data.page,
     query = data.query,
     buildId = data.buildId,
-    dynamicBuildId = data.dynamicBuildId,
     assetPrefix = data.assetPrefix,
     runtimeConfig = data.runtimeConfig,
     dynamicIds = data.dynamicIds;
@@ -516,8 +515,6 @@ function () {
             return window.__NEXT_PRELOADREADY(dynamicIds);
 
           case 22:
-            if (false) {}
-
             exports.router = router = (0, _router.createRouter)(page, query, asPath, {
               initialProps: props,
               pageLoader: pageLoader,
@@ -548,7 +545,7 @@ function () {
             render(renderCtx);
             return _context.abrupt("return", emitter);
 
-          case 27:
+          case 26:
           case "end":
             return _context.stop();
         }
@@ -1435,8 +1432,6 @@ var PageLoader =
 /*#__PURE__*/
 function () {
   function PageLoader(buildId, assetPrefix) {
-    var _this3 = this;
-
     _classCallCheck(this, PageLoader);
 
     this.buildId = buildId;
@@ -1444,9 +1439,6 @@ function () {
     this.pageCache = {};
     this.pageRegisterEvents = (0, _mitt["default"])();
     this.loadingRoutes = {};
-    this.promisedBuildId = _promise["default"].resolve();
-
-    if (false) {}
 
     if (false) {}
   } // Returns a promise for the dependencies for a particular route
@@ -1475,7 +1467,7 @@ function () {
   }, {
     key: "loadPage",
     value: function loadPage(route) {
-      var _this4 = this;
+      var _this3 = this;
 
       route = this.normalizeRoute(route);
       return new _promise["default"](function (resolve, reject) {
@@ -1483,9 +1475,9 @@ function () {
           var error = _ref.error,
               page = _ref.page;
 
-          _this4.pageRegisterEvents.off(route, fire);
+          _this3.pageRegisterEvents.off(route, fire);
 
-          delete _this4.loadingRoutes[route];
+          delete _this3.loadingRoutes[route];
 
           if (error) {
             reject(error);
@@ -1495,7 +1487,7 @@ function () {
         }; // If there's a cached version of the page, let's use it.
 
 
-        var cachedPage = _this4.pageCache[route];
+        var cachedPage = _this3.pageCache[route];
 
         if (cachedPage) {
           var error = cachedPage.error,
@@ -1505,7 +1497,7 @@ function () {
         } // Register a listener to get the page
 
 
-        _this4.pageRegisterEvents.on(route, fire); // If the page is loading via SSR, we need to wait for it
+        _this3.pageRegisterEvents.on(route, fire); // If the page is loading via SSR, we need to wait for it
         // rather downloading it again.
 
 
@@ -1513,11 +1505,11 @@ function () {
           return;
         }
 
-        if (!_this4.loadingRoutes[route]) {
+        if (!_this3.loadingRoutes[route]) {
           if (false) {} else {
-            _this4.loadRoute(route);
+            _this3.loadRoute(route);
 
-            _this4.loadingRoutes[route] = true;
+            _this3.loadingRoutes[route] = true;
           }
         }
       });
@@ -1535,22 +1527,13 @@ function () {
           while (1) {
             switch (_context.prev = _context.next) {
               case 0:
-                if (true) {
-                  _context.next = 3;
-                  break;
-                }
-
-                _context.next = 3;
-                return _this.promisedBuildId;
-
-              case 3:
                 route = _this.normalizeRoute(route);
                 scriptRoute = route === '/' ? '/index.js' : route + ".js";
                 url = _this.assetPrefix + "/_next/static/" + encodeURIComponent(_this.buildId) + "/pages" + scriptRoute;
 
                 _this.loadScript(url, route, true);
 
-              case 7:
+              case 4:
               case "end":
                 return _context.stop();
             }
@@ -1561,7 +1544,7 @@ function () {
   }, {
     key: "loadScript",
     value: function loadScript(url, route, isPage) {
-      var _this5 = this;
+      var _this4 = this;
 
       var script = document.createElement('script');
 
@@ -1579,7 +1562,7 @@ function () {
         var error = new Error("Error loading script " + url);
         error.code = 'PAGE_LOAD_ERROR';
 
-        _this5.pageRegisterEvents.emit(route, {
+        _this4.pageRegisterEvents.emit(route, {
           error: error
         });
       };
@@ -1590,7 +1573,7 @@ function () {
   }, {
     key: "registerPage",
     value: function registerPage(route, regFn) {
-      var _this6 = this;
+      var _this5 = this;
 
       var register = function register() {
         try {
@@ -1598,21 +1581,21 @@ function () {
               error = _regFn.error,
               page = _regFn.page;
 
-          _this6.pageCache[route] = {
+          _this5.pageCache[route] = {
             error: error,
             page: page
           };
 
-          _this6.pageRegisterEvents.emit(route, {
+          _this5.pageRegisterEvents.emit(route, {
             error: error,
             page: page
           });
         } catch (error) {
-          _this6.pageCache[route] = {
+          _this5.pageCache[route] = {
             error: error
           };
 
-          _this6.pageRegisterEvents.emit(route, {
+          _this5.pageRegisterEvents.emit(route, {
             error: error
           });
         }
@@ -1635,15 +1618,6 @@ function () {
           while (1) {
             switch (_context2.prev = _context2.next) {
               case 0:
-                if (true) {
-                  _context2.next = 3;
-                  break;
-                }
-
-                _context2.next = 3;
-                return _this2.promisedBuildId;
-
-              case 3:
                 route = _this2.normalizeRoute(route);
                 scriptRoute = (route === '/' ? '/index' : route) + ".js";
 
@@ -1655,68 +1629,68 @@ function () {
                 // its own deduping mechanism.
 
                 if (!document.querySelector("link[rel=\"preload\"][href^=\"" + url + "\"], script[data-next-page=\"" + route + "\"]")) {
-                  _context2.next = 9;
+                  _context2.next = 6;
                   break;
                 }
 
                 return _context2.abrupt("return");
 
-              case 9:
+              case 6:
                 if (!(cn = navigator.connection)) {
-                  _context2.next = 12;
+                  _context2.next = 9;
                   break;
                 }
 
                 if (!((cn.effectiveType || '').indexOf('2g') !== -1 || cn.saveData)) {
-                  _context2.next = 12;
+                  _context2.next = 9;
                   break;
                 }
 
                 return _context2.abrupt("return");
 
-              case 12:
+              case 9:
                 if (true) {
-                  _context2.next = 18;
+                  _context2.next = 15;
                   break;
                 }
 
                 ;
-                _context2.next = 16;
+                _context2.next = 13;
                 return _this2.getDependencies(route);
 
-              case 16:
+              case 13:
                 _context2.t0 = function (url) {
                   _this2.prefetch(url, true);
                 };
 
                 _context2.sent.forEach(_context2.t0);
 
-              case 18:
+              case 15:
                 if (!hasPreload) {
-                  _context2.next = 21;
+                  _context2.next = 18;
                   break;
                 }
 
                 preloadScript(url);
                 return _context2.abrupt("return");
 
-              case 21:
+              case 18:
                 if (!isDependency) {
-                  _context2.next = 23;
+                  _context2.next = 20;
                   break;
                 }
 
                 return _context2.abrupt("return");
 
-              case 23:
+              case 20:
                 if (!(document.readyState === 'complete')) {
-                  _context2.next = 27;
+                  _context2.next = 24;
                   break;
                 }
 
                 return _context2.abrupt("return", _this2.loadPage(route)["catch"](function () {}));
 
-              case 27:
+              case 24:
                 return _context2.abrupt("return", new _promise["default"](function (resolve) {
                   window.addEventListener('load', function () {
                     _this2.loadPage(route).then(function () {
@@ -1727,7 +1701,7 @@ function () {
                   });
                 }));
 
-              case 28:
+              case 25:
               case "end":
                 return _context2.stop();
             }
Diff for main-HASH.module.js
@@ -416,7 +416,6 @@ const {
   page,
   query,
   buildId,
-  dynamicBuildId,
   assetPrefix,
   runtimeConfig,
   dynamicIds
@@ -531,8 +530,6 @@ function () {
       yield window.__NEXT_PRELOADREADY(dynamicIds);
     }
 
-    if (false) {}
-
     exports.router = router = (0, _router.createRouter)(page, query, asPath, {
       initialProps: props,
       pageLoader,
@@ -1351,9 +1348,6 @@ class PageLoader {
     this.pageCache = {};
     this.pageRegisterEvents = (0, _mitt.default)();
     this.loadingRoutes = {};
-    this.promisedBuildId = _promise.default.resolve();
-
-    if (false) {}
 
     if (false) {}
   } // Returns a promise for the dependencies for a particular route
@@ -1424,8 +1418,6 @@ class PageLoader {
     var _this = this;
 
     return (0, _asyncToGenerator2.default)(function* () {
-      if (false) {}
-
       route = _this.normalizeRoute(route);
       let scriptRoute = route === '/' ? '/index.js' : route + ".js";
       const url = _this.assetPrefix + "/_next/static/" + encodeURIComponent(_this.buildId) + "/pages" + scriptRoute;
@@ -1493,8 +1485,6 @@ class PageLoader {
     var _this2 = this;
 
     return (0, _asyncToGenerator2.default)(function* () {
-      if (false) {}
-
       route = _this2.normalizeRoute(route);
       let scriptRoute = (route === '/' ? '/index' : route) + ".js";

Serverless Mode (Decrease detected ✓)
General Overall decrease ✓
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
buildDuration 25.7s 26s ⚠️ +315ms
nodeModulesSize 41.3 MB 41.2 MB -67.5 kB
Client Bundles (main, webpack, commons) Overall decrease ✓
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
main-HASH.js 17.9 kB 17.8 kB -107 B
main-HASH.js gzip 6.56 kB 6.54 kB -22 B
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
commons.HASH.js 190 kB 190 kB
commons.HASH.js gzip 61.6 kB 61.6 kB
Overall change -107 B
Client Bundles (main, webpack, commons) Modern Overall decrease ✓
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
main-HASH.module.js 16.2 kB 16.1 kB -61 B
main-HASH.module.js gzip 6.28 kB 6.27 kB -9 B
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH.module.js gzip 746 B 746 B
commons.HASH.module.js 171 kB 171 kB
commons.HASH.module.js gzip 55.4 kB 55.4 kB
Overall change -61 B
Client Pages
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
_app.js 1.9 kB 1.9 kB
_app.js gzip 905 B 905 B
_error.js 12.1 kB 12.1 kB
_error.js gzip 4.76 kB 4.76 kB
hooks.js 1.06 kB 1.06 kB
hooks.js gzip 600 B 600 B
index.js 343 B 343 B
index.js gzip 237 B 237 B
link.js 8.13 kB 8.13 kB
link.js gzip 3.49 kB 3.49 kB
routerDirect.js 429 B 429 B
routerDirect.js gzip 292 B 292 B
withRouter.js 439 B 439 B
withRouter.js gzip 290 B 290 B
Overall change
Client Pages Modern
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
_app.module.js 1.79 kB 1.79 kB
_app.module.js gzip 865 B 865 B
_error.module.js 10.6 kB 10.6 kB
_error.module.js gzip 4.31 kB 4.31 kB
hooks.module.js 596 B 596 B
hooks.module.js gzip 354 B 354 B
index.module.js 319 B 319 B
index.module.js gzip 238 B 238 B
link.module.js 8.52 kB 8.52 kB
link.module.js gzip 3.67 kB 3.67 kB
routerDirect.module.js 417 B 417 B
routerDirect.module.js gzip 292 B 292 B
withRouter.module.js 427 B 427 B
withRouter.module.js gzip 291 B 291 B
Overall change
Serverless bundles Overall decrease ✓
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
_error.js 247 kB 247 kB -730 B
_error.js gzip 66.3 kB 66.3 kB -6 B
hooks.html 2.87 kB 2.85 kB -23 B
hooks.html gzip 864 B 852 B -12 B
index.js 248 kB 247 kB -855 B
index.js gzip 66.6 kB 66.4 kB -251 B
link.js 255 kB 254 kB -855 B
link.js gzip 68.8 kB 68.7 kB -88 B
routerDirect.js 248 kB 248 kB -855 B
routerDirect.js gzip 66.5 kB 66.5 kB -72 B
withRouter.js 248 kB 247 kB -855 B
withRouter.js gzip 66.6 kB 66.5 kB -78 B
Overall change -4.17 kB

@ijjk
Copy link
Member

ijjk commented Aug 20, 2019

Stats from current PR

Default Server Mode (Decrease detected ✓)
General Overall decrease ✓
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
buildDuration 27.5s 27s -447ms
nodeModulesSize 41.3 MB 41.2 MB -67.5 kB
Client Bundles (main, webpack, commons) Overall decrease ✓
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
main-HASH.js 17.9 kB 17.8 kB -107 B
main-HASH.js gzip 6.56 kB 6.54 kB -22 B
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
commons.HASH.js 190 kB 190 kB
commons.HASH.js gzip 61.6 kB 61.6 kB
Overall change -107 B
Client Bundles (main, webpack, commons) Modern Overall decrease ✓
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
main-HASH.module.js 16.2 kB 16.1 kB -61 B
main-HASH.module.js gzip 6.28 kB 6.27 kB -9 B
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH.module.js gzip 746 B 746 B
commons.HASH.module.js 171 kB 171 kB
commons.HASH.module.js gzip 55.4 kB 55.4 kB
Overall change -61 B
Client Pages
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
_app.js 1.9 kB 1.9 kB
_app.js gzip 905 B 905 B
_error.js 12.1 kB 12.1 kB
_error.js gzip 4.76 kB 4.76 kB
hooks.js 1.06 kB 1.06 kB
hooks.js gzip 600 B 600 B
index.js 343 B 343 B
index.js gzip 237 B 237 B
link.js 8.13 kB 8.13 kB
link.js gzip 3.49 kB 3.49 kB
routerDirect.js 429 B 429 B
routerDirect.js gzip 292 B 292 B
withRouter.js 439 B 439 B
withRouter.js gzip 290 B 290 B
Overall change
Client Pages Modern
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
_app.module.js 1.79 kB 1.79 kB
_app.module.js gzip 865 B 865 B
_error.module.js 10.6 kB 10.6 kB
_error.module.js gzip 4.31 kB 4.31 kB
hooks.module.js 596 B 596 B
hooks.module.js gzip 354 B 354 B
index.module.js 319 B 319 B
index.module.js gzip 238 B 238 B
link.module.js 8.52 kB 8.52 kB
link.module.js gzip 3.67 kB 3.67 kB
routerDirect.module.js 417 B 417 B
routerDirect.module.js gzip 292 B 292 B
withRouter.module.js 427 B 427 B
withRouter.module.js gzip 291 B 291 B
Overall change
Fetched pages Overall decrease ✓
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
link 2.8 kB 2.78 kB -23 B
link gzip 848 B 833 B -15 B
index 2.75 kB 2.73 kB -23 B
index gzip 841 B 827 B -14 B
withRouter 2.81 kB 2.79 kB -23 B
withRouter gzip 835 B 820 B -15 B
Overall change -69 B

Diffs

Diff for main-HASH.js
@@ -343,7 +343,6 @@ var props = data.props,
     page = data.page,
     query = data.query,
     buildId = data.buildId,
-    dynamicBuildId = data.dynamicBuildId,
     assetPrefix = data.assetPrefix,
     runtimeConfig = data.runtimeConfig,
     dynamicIds = data.dynamicIds;
@@ -516,8 +515,6 @@ function () {
             return window.__NEXT_PRELOADREADY(dynamicIds);
 
           case 22:
-            if (false) {}
-
             exports.router = router = (0, _router.createRouter)(page, query, asPath, {
               initialProps: props,
               pageLoader: pageLoader,
@@ -548,7 +545,7 @@ function () {
             render(renderCtx);
             return _context.abrupt("return", emitter);
 
-          case 27:
+          case 26:
           case "end":
             return _context.stop();
         }
@@ -1435,8 +1432,6 @@ var PageLoader =
 /*#__PURE__*/
 function () {
   function PageLoader(buildId, assetPrefix) {
-    var _this3 = this;
-
     _classCallCheck(this, PageLoader);
 
     this.buildId = buildId;
@@ -1444,9 +1439,6 @@ function () {
     this.pageCache = {};
     this.pageRegisterEvents = (0, _mitt["default"])();
     this.loadingRoutes = {};
-    this.promisedBuildId = _promise["default"].resolve();
-
-    if (false) {}
 
     if (false) {}
   } // Returns a promise for the dependencies for a particular route
@@ -1475,7 +1467,7 @@ function () {
   }, {
     key: "loadPage",
     value: function loadPage(route) {
-      var _this4 = this;
+      var _this3 = this;
 
       route = this.normalizeRoute(route);
       return new _promise["default"](function (resolve, reject) {
@@ -1483,9 +1475,9 @@ function () {
           var error = _ref.error,
               page = _ref.page;
 
-          _this4.pageRegisterEvents.off(route, fire);
+          _this3.pageRegisterEvents.off(route, fire);
 
-          delete _this4.loadingRoutes[route];
+          delete _this3.loadingRoutes[route];
 
           if (error) {
             reject(error);
@@ -1495,7 +1487,7 @@ function () {
         }; // If there's a cached version of the page, let's use it.
 
 
-        var cachedPage = _this4.pageCache[route];
+        var cachedPage = _this3.pageCache[route];
 
         if (cachedPage) {
           var error = cachedPage.error,
@@ -1505,7 +1497,7 @@ function () {
         } // Register a listener to get the page
 
 
-        _this4.pageRegisterEvents.on(route, fire); // If the page is loading via SSR, we need to wait for it
+        _this3.pageRegisterEvents.on(route, fire); // If the page is loading via SSR, we need to wait for it
         // rather downloading it again.
 
 
@@ -1513,11 +1505,11 @@ function () {
           return;
         }
 
-        if (!_this4.loadingRoutes[route]) {
+        if (!_this3.loadingRoutes[route]) {
           if (false) {} else {
-            _this4.loadRoute(route);
+            _this3.loadRoute(route);
 
-            _this4.loadingRoutes[route] = true;
+            _this3.loadingRoutes[route] = true;
           }
         }
       });
@@ -1535,22 +1527,13 @@ function () {
           while (1) {
             switch (_context.prev = _context.next) {
               case 0:
-                if (true) {
-                  _context.next = 3;
-                  break;
-                }
-
-                _context.next = 3;
-                return _this.promisedBuildId;
-
-              case 3:
                 route = _this.normalizeRoute(route);
                 scriptRoute = route === '/' ? '/index.js' : route + ".js";
                 url = _this.assetPrefix + "/_next/static/" + encodeURIComponent(_this.buildId) + "/pages" + scriptRoute;
 
                 _this.loadScript(url, route, true);
 
-              case 7:
+              case 4:
               case "end":
                 return _context.stop();
             }
@@ -1561,7 +1544,7 @@ function () {
   }, {
     key: "loadScript",
     value: function loadScript(url, route, isPage) {
-      var _this5 = this;
+      var _this4 = this;
 
       var script = document.createElement('script');
 
@@ -1579,7 +1562,7 @@ function () {
         var error = new Error("Error loading script " + url);
         error.code = 'PAGE_LOAD_ERROR';
 
-        _this5.pageRegisterEvents.emit(route, {
+        _this4.pageRegisterEvents.emit(route, {
           error: error
         });
       };
@@ -1590,7 +1573,7 @@ function () {
   }, {
     key: "registerPage",
     value: function registerPage(route, regFn) {
-      var _this6 = this;
+      var _this5 = this;
 
       var register = function register() {
         try {
@@ -1598,21 +1581,21 @@ function () {
               error = _regFn.error,
               page = _regFn.page;
 
-          _this6.pageCache[route] = {
+          _this5.pageCache[route] = {
             error: error,
             page: page
           };
 
-          _this6.pageRegisterEvents.emit(route, {
+          _this5.pageRegisterEvents.emit(route, {
             error: error,
             page: page
           });
         } catch (error) {
-          _this6.pageCache[route] = {
+          _this5.pageCache[route] = {
             error: error
           };
 
-          _this6.pageRegisterEvents.emit(route, {
+          _this5.pageRegisterEvents.emit(route, {
             error: error
           });
         }
@@ -1635,15 +1618,6 @@ function () {
           while (1) {
             switch (_context2.prev = _context2.next) {
               case 0:
-                if (true) {
-                  _context2.next = 3;
-                  break;
-                }
-
-                _context2.next = 3;
-                return _this2.promisedBuildId;
-
-              case 3:
                 route = _this2.normalizeRoute(route);
                 scriptRoute = (route === '/' ? '/index' : route) + ".js";
 
@@ -1655,68 +1629,68 @@ function () {
                 // its own deduping mechanism.
 
                 if (!document.querySelector("link[rel=\"preload\"][href^=\"" + url + "\"], script[data-next-page=\"" + route + "\"]")) {
-                  _context2.next = 9;
+                  _context2.next = 6;
                   break;
                 }
 
                 return _context2.abrupt("return");
 
-              case 9:
+              case 6:
                 if (!(cn = navigator.connection)) {
-                  _context2.next = 12;
+                  _context2.next = 9;
                   break;
                 }
 
                 if (!((cn.effectiveType || '').indexOf('2g') !== -1 || cn.saveData)) {
-                  _context2.next = 12;
+                  _context2.next = 9;
                   break;
                 }
 
                 return _context2.abrupt("return");
 
-              case 12:
+              case 9:
                 if (true) {
-                  _context2.next = 18;
+                  _context2.next = 15;
                   break;
                 }
 
                 ;
-                _context2.next = 16;
+                _context2.next = 13;
                 return _this2.getDependencies(route);
 
-              case 16:
+              case 13:
                 _context2.t0 = function (url) {
                   _this2.prefetch(url, true);
                 };
 
                 _context2.sent.forEach(_context2.t0);
 
-              case 18:
+              case 15:
                 if (!hasPreload) {
-                  _context2.next = 21;
+                  _context2.next = 18;
                   break;
                 }
 
                 preloadScript(url);
                 return _context2.abrupt("return");
 
-              case 21:
+              case 18:
                 if (!isDependency) {
-                  _context2.next = 23;
+                  _context2.next = 20;
                   break;
                 }
 
                 return _context2.abrupt("return");
 
-              case 23:
+              case 20:
                 if (!(document.readyState === 'complete')) {
-                  _context2.next = 27;
+                  _context2.next = 24;
                   break;
                 }
 
                 return _context2.abrupt("return", _this2.loadPage(route)["catch"](function () {}));
 
-              case 27:
+              case 24:
                 return _context2.abrupt("return", new _promise["default"](function (resolve) {
                   window.addEventListener('load', function () {
                     _this2.loadPage(route).then(function () {
@@ -1727,7 +1701,7 @@ function () {
                   });
                 }));
 
-              case 28:
+              case 25:
               case "end":
                 return _context2.stop();
             }
Diff for main-HASH.module.js
@@ -416,7 +416,6 @@ const {
   page,
   query,
   buildId,
-  dynamicBuildId,
   assetPrefix,
   runtimeConfig,
   dynamicIds
@@ -531,8 +530,6 @@ function () {
       yield window.__NEXT_PRELOADREADY(dynamicIds);
     }
 
-    if (false) {}
-
     exports.router = router = (0, _router.createRouter)(page, query, asPath, {
       initialProps: props,
       pageLoader,
@@ -1351,9 +1348,6 @@ class PageLoader {
     this.pageCache = {};
     this.pageRegisterEvents = (0, _mitt.default)();
     this.loadingRoutes = {};
-    this.promisedBuildId = _promise.default.resolve();
-
-    if (false) {}
 
     if (false) {}
   } // Returns a promise for the dependencies for a particular route
@@ -1424,8 +1418,6 @@ class PageLoader {
     var _this = this;
 
     return (0, _asyncToGenerator2.default)(function* () {
-      if (false) {}
-
       route = _this.normalizeRoute(route);
       let scriptRoute = route === '/' ? '/index.js' : route + ".js";
       const url = _this.assetPrefix + "/_next/static/" + encodeURIComponent(_this.buildId) + "/pages" + scriptRoute;
@@ -1493,8 +1485,6 @@ class PageLoader {
     var _this2 = this;
 
     return (0, _asyncToGenerator2.default)(function* () {
-      if (false) {}
-
       route = _this2.normalizeRoute(route);
       let scriptRoute = (route === '/' ? '/index' : route) + ".js";

Serverless Mode (Decrease detected ✓)
General Overall decrease ✓
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
buildDuration 29.4s 29.6s ⚠️ +158ms
nodeModulesSize 41.3 MB 41.2 MB -67.5 kB
Client Bundles (main, webpack, commons) Overall decrease ✓
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
main-HASH.js 17.9 kB 17.8 kB -107 B
main-HASH.js gzip 6.56 kB 6.54 kB -22 B
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
commons.HASH.js 190 kB 190 kB
commons.HASH.js gzip 61.6 kB 61.6 kB
Overall change -107 B
Client Bundles (main, webpack, commons) Modern Overall decrease ✓
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
main-HASH.module.js 16.2 kB 16.1 kB -61 B
main-HASH.module.js gzip 6.28 kB 6.27 kB -9 B
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH.module.js gzip 746 B 746 B
commons.HASH.module.js 171 kB 171 kB
commons.HASH.module.js gzip 55.4 kB 55.4 kB
Overall change -61 B
Client Pages
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
_app.js 1.9 kB 1.9 kB
_app.js gzip 905 B 905 B
_error.js 12.1 kB 12.1 kB
_error.js gzip 4.76 kB 4.76 kB
hooks.js 1.06 kB 1.06 kB
hooks.js gzip 600 B 600 B
index.js 343 B 343 B
index.js gzip 237 B 237 B
link.js 8.13 kB 8.13 kB
link.js gzip 3.49 kB 3.49 kB
routerDirect.js 429 B 429 B
routerDirect.js gzip 292 B 292 B
withRouter.js 439 B 439 B
withRouter.js gzip 290 B 290 B
Overall change
Client Pages Modern
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
_app.module.js 1.79 kB 1.79 kB
_app.module.js gzip 865 B 865 B
_error.module.js 10.6 kB 10.6 kB
_error.module.js gzip 4.31 kB 4.31 kB
hooks.module.js 596 B 596 B
hooks.module.js gzip 354 B 354 B
index.module.js 319 B 319 B
index.module.js gzip 238 B 238 B
link.module.js 8.52 kB 8.52 kB
link.module.js gzip 3.67 kB 3.67 kB
routerDirect.module.js 417 B 417 B
routerDirect.module.js gzip 292 B 292 B
withRouter.module.js 427 B 427 B
withRouter.module.js gzip 291 B 291 B
Overall change
Serverless bundles Overall decrease ✓
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
_error.js 247 kB 247 kB -730 B
_error.js gzip 66.3 kB 66.3 kB -6 B
hooks.html 2.87 kB 2.85 kB -23 B
hooks.html gzip 864 B 852 B -12 B
index.js 248 kB 247 kB -855 B
index.js gzip 66.6 kB 66.4 kB -252 B
link.js 255 kB 254 kB -855 B
link.js gzip 68.8 kB 68.7 kB -88 B
routerDirect.js 248 kB 248 kB -855 B
routerDirect.js gzip 66.5 kB 66.5 kB -71 B
withRouter.js 248 kB 247 kB -855 B
withRouter.js gzip 66.6 kB 66.5 kB -78 B
Overall change -4.17 kB

@Timer Timer requested a review from ijjk August 20, 2019 06:21
@ijjk
Copy link
Member

ijjk commented Aug 20, 2019

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall decrease ✓
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
buildDuration 25.2s 24.6s -591ms
nodeModulesSize 41.3 MB 41.2 MB -67.5 kB
Client Bundles (main, webpack, commons) Overall decrease ✓
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
main-HASH.js 18.2 kB 18.1 kB -107 B
main-HASH.js gzip 6.65 kB 6.63 kB -24 B
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
Overall change -107 B
Client Bundles (main, webpack, commons) Modern Overall decrease ✓
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
main-HASH.module.js 16.5 kB 16.5 kB -61 B
main-HASH.module.js gzip 6.37 kB 6.36 kB -11 B
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH.module.js gzip 746 B 746 B
Overall change -61 B
Client Pages
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
_app.js 1.9 kB 1.9 kB
_app.js gzip 908 B 908 B
_error.js 12.1 kB 12.1 kB
_error.js gzip 4.76 kB 4.76 kB
hooks.js 12.7 kB 12.7 kB
hooks.js gzip 4.81 kB 4.81 kB
index.js 343 B 343 B
index.js gzip 237 B 237 B
link.js 8.14 kB 8.14 kB
link.js gzip 3.49 kB 3.49 kB
routerDirect.js 433 B 433 B
routerDirect.js gzip 296 B 296 B
withRouter.js 444 B 444 B
withRouter.js gzip 294 B 294 B
Overall change
Client Pages Modern
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
_app.module.js 1.79 kB 1.79 kB
_app.module.js gzip 867 B 867 B
_error.module.js 23.3 kB 23.3 kB
_error.module.js gzip 8.62 kB 8.62 kB
hooks.module.js 1.55 kB 1.55 kB
hooks.module.js gzip 804 B 804 B
index.module.js 319 B 319 B
index.module.js gzip 238 B 238 B
link.module.js 8.52 kB 8.52 kB
link.module.js gzip 3.68 kB 3.68 kB
routerDirect.module.js 419 B 419 B
routerDirect.module.js gzip 294 B 294 B
withRouter.module.js 429 B 429 B
withRouter.module.js gzip 293 B 293 B
Overall change
Client Build Manifests Overall increase ⚠️
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
_buildManifest.js 81 B 81 B
_buildManifest.js gzip 61 B 61 B
_buildManifest.module.js 518 B 519 B ⚠️ +1 B
_buildManifest.module.js gzip 309 B 310 B ⚠️ +1 B
Overall change ⚠️ +1 B
Fetched pages Overall decrease ✓
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
link 3.77 kB 3.75 kB -20 B
link gzip 971 B 963 B -8 B
index 3.71 kB 3.69 kB -20 B
index gzip 962 B 954 B -8 B
withRouter 3.77 kB 3.75 kB -20 B
withRouter gzip 957 B 950 B -7 B
Overall change -60 B

Diffs

Diff for main-HASH.js
@@ -343,7 +343,6 @@ var props = data.props,
     page = data.page,
     query = data.query,
     buildId = data.buildId,
-    dynamicBuildId = data.dynamicBuildId,
     assetPrefix = data.assetPrefix,
     runtimeConfig = data.runtimeConfig,
     dynamicIds = data.dynamicIds;
@@ -516,8 +515,6 @@ function () {
             return window.__NEXT_PRELOADREADY(dynamicIds);
 
           case 22:
-            if (false) {}
-
             exports.router = router = (0, _router.createRouter)(page, query, asPath, {
               initialProps: props,
               pageLoader: pageLoader,
@@ -548,7 +545,7 @@ function () {
             render(renderCtx);
             return _context.abrupt("return", emitter);
 
-          case 27:
+          case 26:
           case "end":
             return _context.stop();
         }
@@ -1435,8 +1432,6 @@ var PageLoader =
 /*#__PURE__*/
 function () {
   function PageLoader(buildId, assetPrefix) {
-    var _this3 = this;
-
     _classCallCheck(this, PageLoader);
 
     this.buildId = buildId;
@@ -1444,7 +1439,6 @@ function () {
     this.pageCache = {};
     this.pageRegisterEvents = (0, _mitt["default"])();
     this.loadingRoutes = {};
-    this.promisedBuildId = _promise["default"].resolve();
 
     if (true) {
       this.promisedBuildManifest = new _promise["default"](function (resolve) {
@@ -1457,8 +1451,6 @@ function () {
         }
       });
     }
-
-    if (false) {}
   } // Returns a promise for the dependencies for a particular route
 
 
@@ -1485,7 +1477,7 @@ function () {
   }, {
     key: "loadPage",
     value: function loadPage(route) {
-      var _this4 = this;
+      var _this3 = this;
 
       route = this.normalizeRoute(route);
       return new _promise["default"](function (resolve, reject) {
@@ -1493,9 +1485,9 @@ function () {
           var error = _ref.error,
               page = _ref.page;
 
-          _this4.pageRegisterEvents.off(route, fire);
+          _this3.pageRegisterEvents.off(route, fire);
 
-          delete _this4.loadingRoutes[route];
+          delete _this3.loadingRoutes[route];
 
           if (error) {
             reject(error);
@@ -1505,7 +1497,7 @@ function () {
         }; // If there's a cached version of the page, let's use it.
 
 
-        var cachedPage = _this4.pageCache[route];
+        var cachedPage = _this3.pageCache[route];
 
         if (cachedPage) {
           var error = cachedPage.error,
@@ -1515,7 +1507,7 @@ function () {
         } // Register a listener to get the page
 
 
-        _this4.pageRegisterEvents.on(route, fire); // If the page is loading via SSR, we need to wait for it
+        _this3.pageRegisterEvents.on(route, fire); // If the page is loading via SSR, we need to wait for it
         // rather downloading it again.
 
 
@@ -1523,18 +1515,18 @@ function () {
           return;
         }
 
-        if (!_this4.loadingRoutes[route]) {
+        if (!_this3.loadingRoutes[route]) {
           if (true) {
-            _this4.getDependencies(route).then(function (deps) {
+            _this3.getDependencies(route).then(function (deps) {
               deps.forEach(function (d) {
                 if (!document.querySelector("script[src^=\"" + d + "\"]")) {
-                  _this4.loadScript(d, route, false);
+                  _this3.loadScript(d, route, false);
                 }
               });
 
-              _this4.loadRoute(route);
+              _this3.loadRoute(route);
 
-              _this4.loadingRoutes[route] = true;
+              _this3.loadingRoutes[route] = true;
             });
           } else {}
         }
@@ -1553,22 +1545,13 @@ function () {
           while (1) {
             switch (_context.prev = _context.next) {
               case 0:
-                if (true) {
-                  _context.next = 3;
-                  break;
-                }
-
-                _context.next = 3;
-                return _this.promisedBuildId;
-
-              case 3:
                 route = _this.normalizeRoute(route);
                 scriptRoute = route === '/' ? '/index.js' : route + ".js";
                 url = _this.assetPrefix + "/_next/static/" + encodeURIComponent(_this.buildId) + "/pages" + scriptRoute;
 
                 _this.loadScript(url, route, true);
 
-              case 7:
+              case 4:
               case "end":
                 return _context.stop();
             }
@@ -1579,7 +1562,7 @@ function () {
   }, {
     key: "loadScript",
     value: function loadScript(url, route, isPage) {
-      var _this5 = this;
+      var _this4 = this;
 
       var script = document.createElement('script');
 
@@ -1597,7 +1580,7 @@ function () {
         var error = new Error("Error loading script " + url);
         error.code = 'PAGE_LOAD_ERROR';
 
-        _this5.pageRegisterEvents.emit(route, {
+        _this4.pageRegisterEvents.emit(route, {
           error: error
         });
       };
@@ -1608,7 +1591,7 @@ function () {
   }, {
     key: "registerPage",
     value: function registerPage(route, regFn) {
-      var _this6 = this;
+      var _this5 = this;
 
       var register = function register() {
         try {
@@ -1616,21 +1599,21 @@ function () {
               error = _regFn.error,
               page = _regFn.page;
 
-          _this6.pageCache[route] = {
+          _this5.pageCache[route] = {
             error: error,
             page: page
           };
 
-          _this6.pageRegisterEvents.emit(route, {
+          _this5.pageRegisterEvents.emit(route, {
             error: error,
             page: page
           });
         } catch (error) {
-          _this6.pageCache[route] = {
+          _this5.pageCache[route] = {
             error: error
           };
 
-          _this6.pageRegisterEvents.emit(route, {
+          _this5.pageRegisterEvents.emit(route, {
             error: error
           });
         }
@@ -1653,15 +1636,6 @@ function () {
           while (1) {
             switch (_context2.prev = _context2.next) {
               case 0:
-                if (true) {
-                  _context2.next = 3;
-                  break;
-                }
-
-                _context2.next = 3;
-                return _this2.promisedBuildId;
-
-              case 3:
                 route = _this2.normalizeRoute(route);
                 scriptRoute = (route === '/' ? '/index' : route) + ".js";
 
@@ -1673,68 +1647,68 @@ function () {
                 // its own deduping mechanism.
 
                 if (!document.querySelector("link[rel=\"preload\"][href^=\"" + url + "\"], script[data-next-page=\"" + route + "\"]")) {
-                  _context2.next = 9;
+                  _context2.next = 6;
                   break;
                 }
 
                 return _context2.abrupt("return");
 
-              case 9:
+              case 6:
                 if (!(cn = navigator.connection)) {
-                  _context2.next = 12;
+                  _context2.next = 9;
                   break;
                 }
 
                 if (!((cn.effectiveType || '').indexOf('2g') !== -1 || cn.saveData)) {
-                  _context2.next = 12;
+                  _context2.next = 9;
                   break;
                 }
 
                 return _context2.abrupt("return");
 
-              case 12:
+              case 9:
                 if (!( true && !isDependency)) {
-                  _context2.next = 18;
+                  _context2.next = 15;
                   break;
                 }
 
                 ;
-                _context2.next = 16;
+                _context2.next = 13;
                 return _this2.getDependencies(route);
 
-              case 16:
+              case 13:
                 _context2.t0 = function (url) {
                   _this2.prefetch(url, true);
                 };
 
                 _context2.sent.forEach(_context2.t0);
 
-              case 18:
+              case 15:
                 if (!hasPreload) {
-                  _context2.next = 21;
+                  _context2.next = 18;
                   break;
                 }
 
                 preloadScript(url);
                 return _context2.abrupt("return");
 
-              case 21:
+              case 18:
                 if (!isDependency) {
-                  _context2.next = 23;
+                  _context2.next = 20;
                   break;
                 }
 
                 return _context2.abrupt("return");
 
-              case 23:
+              case 20:
                 if (!(document.readyState === 'complete')) {
-                  _context2.next = 27;
+                  _context2.next = 24;
                   break;
                 }
 
                 return _context2.abrupt("return", _this2.loadPage(route)["catch"](function () {}));
 
-              case 27:
+              case 24:
                 return _context2.abrupt("return", new _promise["default"](function (resolve) {
                   window.addEventListener('load', function () {
                     _this2.loadPage(route).then(function () {
@@ -1745,7 +1719,7 @@ function () {
                   });
                 }));
 
-              case 28:
+              case 25:
               case "end":
                 return _context2.stop();
             }
Diff for main-HASH.module.js
@@ -416,7 +416,6 @@ const {
   page,
   query,
   buildId,
-  dynamicBuildId,
   assetPrefix,
   runtimeConfig,
   dynamicIds
@@ -531,8 +530,6 @@ function () {
       yield window.__NEXT_PRELOADREADY(dynamicIds);
     }
 
-    if (false) {}
-
     exports.router = router = (0, _router.createRouter)(page, query, asPath, {
       initialProps: props,
       pageLoader,
@@ -1351,7 +1348,6 @@ class PageLoader {
     this.pageCache = {};
     this.pageRegisterEvents = (0, _mitt.default)();
     this.loadingRoutes = {};
-    this.promisedBuildId = _promise.default.resolve();
 
     if (true) {
       this.promisedBuildManifest = new _promise.default(resolve => {
@@ -1364,8 +1360,6 @@ class PageLoader {
         }
       });
     }
-
-    if (false) {}
   } // Returns a promise for the dependencies for a particular route
 
 
@@ -1441,8 +1435,6 @@ class PageLoader {
     var _this = this;
 
     return (0, _asyncToGenerator2.default)(function* () {
-      if (false) {}
-
       route = _this.normalizeRoute(route);
       let scriptRoute = route === '/' ? '/index.js' : route + ".js";
       const url = _this.assetPrefix + "/_next/static/" + encodeURIComponent(_this.buildId) + "/pages" + scriptRoute;
@@ -1510,8 +1502,6 @@ class PageLoader {
     var _this2 = this;
 
     return (0, _asyncToGenerator2.default)(function* () {
-      if (false) {}
-
       route = _this2.normalizeRoute(route);
       let scriptRoute = (route === '/' ? '/index' : route) + ".js";
Diff for _buildManifest.module.js
@@ -1 +1 @@
-self.__BUILD_MANIFEST = (function(a,b,c,d){return {"/":[a,b],"/_error":[a,c,b],"/hooks":[a,c,b],"/index":[a,b],"/link":[a,c,d,b],"/routerDirect":[a,c,d,b],"/withRouter":[a,c,d,b]}}("static\u002Fruntime\u002Fwebpack-7928590be3ef2e55b835.module.js","static\u002Fruntime\u002Fmain-0299981520514dd2cc2d.module.js","static\u002Fchunks\u002Fframework.cdb73e402d876d4ac87f.module.js","static\u002Fchunks\u002F1QSRrB48e94JKY+T5oL8O+DtGUk=.2da329b7caecfd217e7f.module.js"));self.__BUILD_MANIFEST_CB && self.__BUILD_MANIFEST_CB()
\ No newline at end of file
+self.__BUILD_MANIFEST = (function(a,b,c,d){return {"/":[a,b],"/_error":[a,c,b],"/hooks":[a,c,b],"/index":[a,b],"/link":[a,c,d,b],"/routerDirect":[a,c,d,b],"/withRouter":[a,c,d,b]}}("static\u002Fruntime\u002Fwebpack-7928590be3ef2e55b835.module.js","static\u002Fruntime\u002Fmain-26f52093cd5cae22a02c.module.js","static\u002Fchunks\u002Fframework.cdb73e402d876d4ac87f.module.js","static\u002Fchunks\u002FXm27wiwD0rzW4VpjNIt99rPaI=.2da329b7caecfd217e7f.module.js"));self.__BUILD_MANIFEST_CB && self.__BUILD_MANIFEST_CB()
\ No newline at end of file

Serverless Mode (Increase detected ⚠️)
General Overall decrease ✓
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
buildDuration 26.5s 25.9s -586ms
nodeModulesSize 41.3 MB 41.2 MB -67.5 kB
Client Bundles (main, webpack, commons) Overall decrease ✓
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
main-HASH.js 18.2 kB 18.1 kB -108 B
main-HASH.js gzip 6.65 kB 6.62 kB -25 B
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
Overall change -108 B
Client Bundles (main, webpack, commons) Modern Overall decrease ✓
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
main-HASH.module.js 16.5 kB 16.5 kB -62 B
main-HASH.module.js gzip 6.37 kB 6.36 kB -12 B
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH.module.js gzip 746 B 746 B
Overall change -62 B
Client Pages Overall increase ⚠️
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
_app.js 1.9 kB 1.9 kB
_app.js gzip 908 B 908 B
_error.js 12.1 kB 12.1 kB
_error.js gzip 4.76 kB 4.76 kB ⚠️ +1 B
hooks.js 12.7 kB 12.7 kB
hooks.js gzip 4.81 kB 4.81 kB
index.js 343 B 343 B
index.js gzip 237 B 237 B
link.js 8.14 kB 8.14 kB
link.js gzip 3.49 kB 3.49 kB ⚠️ +1 B
routerDirect.js 433 B 434 B ⚠️ +1 B
routerDirect.js gzip 296 B 296 B
withRouter.js 444 B 444 B
withRouter.js gzip 294 B 294 B
Overall change ⚠️ +1 B
Client Pages Modern Overall increase ⚠️
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
_app.module.js 1.79 kB 1.79 kB
_app.module.js gzip 867 B 866 B -1 B
_error.module.js 23.3 kB 23.3 kB
_error.module.js gzip 8.62 kB 8.62 kB
hooks.module.js 1.55 kB 1.55 kB
hooks.module.js gzip 804 B 805 B ⚠️ +1 B
index.module.js 319 B 319 B
index.module.js gzip 238 B 238 B
link.module.js 8.52 kB 8.52 kB
link.module.js gzip 3.68 kB 3.68 kB
routerDirect.module.js 419 B 419 B
routerDirect.module.js gzip 294 B 294 B
withRouter.module.js 429 B 430 B ⚠️ +1 B
withRouter.module.js gzip 293 B 293 B
Overall change ⚠️ +1 B
Client Build Manifests
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
_buildManifest.js 81 B 81 B
_buildManifest.js gzip 61 B 61 B
_buildManifest.module.js 518 B 518 B
_buildManifest.module.js gzip 311 B 310 B -1 B
Overall change
Serverless bundles Overall decrease ✓
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
_error.js 248 kB 248 kB -730 B
_error.js gzip 66.5 kB 66.5 kB ⚠️ +5 B
hooks.html 3.83 kB 3.81 kB -23 B
hooks.html gzip 995 B 979 B -16 B
index.js 249 kB 248 kB -855 B
index.js gzip 66.8 kB 66.6 kB -241 B
link.js 256 kB 255 kB -855 B
link.js gzip 69 kB 68.9 kB -74 B
routerDirect.js 249 kB 249 kB -855 B
routerDirect.js gzip 66.7 kB 66.7 kB -59 B
withRouter.js 249 kB 249 kB -855 B
withRouter.js gzip 66.8 kB 66.8 kB -54 B
Overall change -4.17 kB

@ijjk
Copy link
Member

ijjk commented Aug 20, 2019

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall decrease ✓
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
buildDuration 23.8s 23.6s -207ms
nodeModulesSize 41.3 MB 41.2 MB -67.5 kB
Client Bundles (main, webpack, commons) Overall decrease ✓
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
main-HASH.js 18.2 kB 18.1 kB -107 B
main-HASH.js gzip 6.65 kB 6.63 kB -24 B
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
Overall change -107 B
Client Bundles (main, webpack, commons) Modern Overall decrease ✓
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
main-HASH.module.js 16.5 kB 16.5 kB -61 B
main-HASH.module.js gzip 6.37 kB 6.36 kB -11 B
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH.module.js gzip 746 B 746 B
Overall change -61 B
Client Pages
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
_app.js 1.9 kB 1.9 kB
_app.js gzip 908 B 908 B
_error.js 12.1 kB 12.1 kB
_error.js gzip 4.76 kB 4.76 kB
hooks.js 12.7 kB 12.7 kB
hooks.js gzip 4.81 kB 4.81 kB
index.js 343 B 343 B
index.js gzip 237 B 237 B
link.js 8.14 kB 8.14 kB
link.js gzip 3.49 kB 3.49 kB
routerDirect.js 433 B 433 B
routerDirect.js gzip 296 B 296 B
withRouter.js 444 B 444 B
withRouter.js gzip 294 B 294 B
Overall change
Client Pages Modern
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
_app.module.js 1.79 kB 1.79 kB
_app.module.js gzip 867 B 867 B
_error.module.js 23.3 kB 23.3 kB
_error.module.js gzip 8.62 kB 8.62 kB
hooks.module.js 1.55 kB 1.55 kB
hooks.module.js gzip 804 B 804 B
index.module.js 319 B 319 B
index.module.js gzip 238 B 238 B
link.module.js 8.52 kB 8.52 kB
link.module.js gzip 3.68 kB 3.68 kB
routerDirect.module.js 419 B 419 B
routerDirect.module.js gzip 294 B 294 B
withRouter.module.js 429 B 429 B
withRouter.module.js gzip 293 B 293 B
Overall change
Client Build Manifests Overall increase ⚠️
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
_buildManifest.js 81 B 81 B
_buildManifest.js gzip 61 B 61 B
_buildManifest.module.js 518 B 519 B ⚠️ +1 B
_buildManifest.module.js gzip 309 B 311 B ⚠️ +2 B
Overall change ⚠️ +1 B
Fetched pages Overall decrease ✓
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
link 3.77 kB 3.75 kB -20 B
link gzip 973 B 962 B -11 B
index 3.71 kB 3.69 kB -20 B
index gzip 965 B 953 B -12 B
withRouter 3.77 kB 3.75 kB -20 B
withRouter gzip 960 B 948 B -12 B
Overall change -60 B

Diffs

Diff for main-HASH.js
@@ -343,7 +343,6 @@ var props = data.props,
     page = data.page,
     query = data.query,
     buildId = data.buildId,
-    dynamicBuildId = data.dynamicBuildId,
     assetPrefix = data.assetPrefix,
     runtimeConfig = data.runtimeConfig,
     dynamicIds = data.dynamicIds;
@@ -516,8 +515,6 @@ function () {
             return window.__NEXT_PRELOADREADY(dynamicIds);
 
           case 22:
-            if (false) {}
-
             exports.router = router = (0, _router.createRouter)(page, query, asPath, {
               initialProps: props,
               pageLoader: pageLoader,
@@ -548,7 +545,7 @@ function () {
             render(renderCtx);
             return _context.abrupt("return", emitter);
 
-          case 27:
+          case 26:
           case "end":
             return _context.stop();
         }
@@ -1435,8 +1432,6 @@ var PageLoader =
 /*#__PURE__*/
 function () {
   function PageLoader(buildId, assetPrefix) {
-    var _this3 = this;
-
     _classCallCheck(this, PageLoader);
 
     this.buildId = buildId;
@@ -1444,7 +1439,6 @@ function () {
     this.pageCache = {};
     this.pageRegisterEvents = (0, _mitt["default"])();
     this.loadingRoutes = {};
-    this.promisedBuildId = _promise["default"].resolve();
 
     if (true) {
       this.promisedBuildManifest = new _promise["default"](function (resolve) {
@@ -1457,8 +1451,6 @@ function () {
         }
       });
     }
-
-    if (false) {}
   } // Returns a promise for the dependencies for a particular route
 
 
@@ -1485,7 +1477,7 @@ function () {
   }, {
     key: "loadPage",
     value: function loadPage(route) {
-      var _this4 = this;
+      var _this3 = this;
 
       route = this.normalizeRoute(route);
       return new _promise["default"](function (resolve, reject) {
@@ -1493,9 +1485,9 @@ function () {
           var error = _ref.error,
               page = _ref.page;
 
-          _this4.pageRegisterEvents.off(route, fire);
+          _this3.pageRegisterEvents.off(route, fire);
 
-          delete _this4.loadingRoutes[route];
+          delete _this3.loadingRoutes[route];
 
           if (error) {
             reject(error);
@@ -1505,7 +1497,7 @@ function () {
         }; // If there's a cached version of the page, let's use it.
 
 
-        var cachedPage = _this4.pageCache[route];
+        var cachedPage = _this3.pageCache[route];
 
         if (cachedPage) {
           var error = cachedPage.error,
@@ -1515,7 +1507,7 @@ function () {
         } // Register a listener to get the page
 
 
-        _this4.pageRegisterEvents.on(route, fire); // If the page is loading via SSR, we need to wait for it
+        _this3.pageRegisterEvents.on(route, fire); // If the page is loading via SSR, we need to wait for it
         // rather downloading it again.
 
 
@@ -1523,18 +1515,18 @@ function () {
           return;
         }
 
-        if (!_this4.loadingRoutes[route]) {
+        if (!_this3.loadingRoutes[route]) {
           if (true) {
-            _this4.getDependencies(route).then(function (deps) {
+            _this3.getDependencies(route).then(function (deps) {
               deps.forEach(function (d) {
                 if (!document.querySelector("script[src^=\"" + d + "\"]")) {
-                  _this4.loadScript(d, route, false);
+                  _this3.loadScript(d, route, false);
                 }
               });
 
-              _this4.loadRoute(route);
+              _this3.loadRoute(route);
 
-              _this4.loadingRoutes[route] = true;
+              _this3.loadingRoutes[route] = true;
             });
           } else {}
         }
@@ -1553,22 +1545,13 @@ function () {
           while (1) {
             switch (_context.prev = _context.next) {
               case 0:
-                if (true) {
-                  _context.next = 3;
-                  break;
-                }
-
-                _context.next = 3;
-                return _this.promisedBuildId;
-
-              case 3:
                 route = _this.normalizeRoute(route);
                 scriptRoute = route === '/' ? '/index.js' : route + ".js";
                 url = _this.assetPrefix + "/_next/static/" + encodeURIComponent(_this.buildId) + "/pages" + scriptRoute;
 
                 _this.loadScript(url, route, true);
 
-              case 7:
+              case 4:
               case "end":
                 return _context.stop();
             }
@@ -1579,7 +1562,7 @@ function () {
   }, {
     key: "loadScript",
     value: function loadScript(url, route, isPage) {
-      var _this5 = this;
+      var _this4 = this;
 
       var script = document.createElement('script');
 
@@ -1597,7 +1580,7 @@ function () {
         var error = new Error("Error loading script " + url);
         error.code = 'PAGE_LOAD_ERROR';
 
-        _this5.pageRegisterEvents.emit(route, {
+        _this4.pageRegisterEvents.emit(route, {
           error: error
         });
       };
@@ -1608,7 +1591,7 @@ function () {
   }, {
     key: "registerPage",
     value: function registerPage(route, regFn) {
-      var _this6 = this;
+      var _this5 = this;
 
       var register = function register() {
         try {
@@ -1616,21 +1599,21 @@ function () {
               error = _regFn.error,
               page = _regFn.page;
 
-          _this6.pageCache[route] = {
+          _this5.pageCache[route] = {
             error: error,
             page: page
           };
 
-          _this6.pageRegisterEvents.emit(route, {
+          _this5.pageRegisterEvents.emit(route, {
             error: error,
             page: page
           });
         } catch (error) {
-          _this6.pageCache[route] = {
+          _this5.pageCache[route] = {
             error: error
           };
 
-          _this6.pageRegisterEvents.emit(route, {
+          _this5.pageRegisterEvents.emit(route, {
             error: error
           });
         }
@@ -1653,15 +1636,6 @@ function () {
           while (1) {
             switch (_context2.prev = _context2.next) {
               case 0:
-                if (true) {
-                  _context2.next = 3;
-                  break;
-                }
-
-                _context2.next = 3;
-                return _this2.promisedBuildId;
-
-              case 3:
                 route = _this2.normalizeRoute(route);
                 scriptRoute = (route === '/' ? '/index' : route) + ".js";
 
@@ -1673,68 +1647,68 @@ function () {
                 // its own deduping mechanism.
 
                 if (!document.querySelector("link[rel=\"preload\"][href^=\"" + url + "\"], script[data-next-page=\"" + route + "\"]")) {
-                  _context2.next = 9;
+                  _context2.next = 6;
                   break;
                 }
 
                 return _context2.abrupt("return");
 
-              case 9:
+              case 6:
                 if (!(cn = navigator.connection)) {
-                  _context2.next = 12;
+                  _context2.next = 9;
                   break;
                 }
 
                 if (!((cn.effectiveType || '').indexOf('2g') !== -1 || cn.saveData)) {
-                  _context2.next = 12;
+                  _context2.next = 9;
                   break;
                 }
 
                 return _context2.abrupt("return");
 
-              case 12:
+              case 9:
                 if (!( true && !isDependency)) {
-                  _context2.next = 18;
+                  _context2.next = 15;
                   break;
                 }
 
                 ;
-                _context2.next = 16;
+                _context2.next = 13;
                 return _this2.getDependencies(route);
 
-              case 16:
+              case 13:
                 _context2.t0 = function (url) {
                   _this2.prefetch(url, true);
                 };
 
                 _context2.sent.forEach(_context2.t0);
 
-              case 18:
+              case 15:
                 if (!hasPreload) {
-                  _context2.next = 21;
+                  _context2.next = 18;
                   break;
                 }
 
                 preloadScript(url);
                 return _context2.abrupt("return");
 
-              case 21:
+              case 18:
                 if (!isDependency) {
-                  _context2.next = 23;
+                  _context2.next = 20;
                   break;
                 }
 
                 return _context2.abrupt("return");
 
-              case 23:
+              case 20:
                 if (!(document.readyState === 'complete')) {
-                  _context2.next = 27;
+                  _context2.next = 24;
                   break;
                 }
 
                 return _context2.abrupt("return", _this2.loadPage(route)["catch"](function () {}));
 
-              case 27:
+              case 24:
                 return _context2.abrupt("return", new _promise["default"](function (resolve) {
                   window.addEventListener('load', function () {
                     _this2.loadPage(route).then(function () {
@@ -1745,7 +1719,7 @@ function () {
                   });
                 }));
 
-              case 28:
+              case 25:
               case "end":
                 return _context2.stop();
             }
Diff for main-HASH.module.js
@@ -416,7 +416,6 @@ const {
   page,
   query,
   buildId,
-  dynamicBuildId,
   assetPrefix,
   runtimeConfig,
   dynamicIds
@@ -531,8 +530,6 @@ function () {
       yield window.__NEXT_PRELOADREADY(dynamicIds);
     }
 
-    if (false) {}
-
     exports.router = router = (0, _router.createRouter)(page, query, asPath, {
       initialProps: props,
       pageLoader,
@@ -1351,7 +1348,6 @@ class PageLoader {
     this.pageCache = {};
     this.pageRegisterEvents = (0, _mitt.default)();
     this.loadingRoutes = {};
-    this.promisedBuildId = _promise.default.resolve();
 
     if (true) {
       this.promisedBuildManifest = new _promise.default(resolve => {
@@ -1364,8 +1360,6 @@ class PageLoader {
         }
       });
     }
-
-    if (false) {}
   } // Returns a promise for the dependencies for a particular route
 
 
@@ -1441,8 +1435,6 @@ class PageLoader {
     var _this = this;
 
     return (0, _asyncToGenerator2.default)(function* () {
-      if (false) {}
-
       route = _this.normalizeRoute(route);
       let scriptRoute = route === '/' ? '/index.js' : route + ".js";
       const url = _this.assetPrefix + "/_next/static/" + encodeURIComponent(_this.buildId) + "/pages" + scriptRoute;
@@ -1510,8 +1502,6 @@ class PageLoader {
     var _this2 = this;
 
     return (0, _asyncToGenerator2.default)(function* () {
-      if (false) {}
-
       route = _this2.normalizeRoute(route);
       let scriptRoute = (route === '/' ? '/index' : route) + ".js";
Diff for _buildManifest.module.js
@@ -1 +1 @@
-self.__BUILD_MANIFEST = (function(a,b,c,d){return {"/":[a,b],"/_error":[a,c,b],"/hooks":[a,c,b],"/index":[a,b],"/link":[a,c,d,b],"/routerDirect":[a,c,d,b],"/withRouter":[a,c,d,b]}}("static\u002Fruntime\u002Fwebpack-7928590be3ef2e55b835.module.js","static\u002Fruntime\u002Fmain-0299981520514dd2cc2d.module.js","static\u002Fchunks\u002Fframework.cdb73e402d876d4ac87f.module.js","static\u002Fchunks\u002FdnN3gmjSugypOOxWPFQu1dHcqkM=.2da329b7caecfd217e7f.module.js"));self.__BUILD_MANIFEST_CB && self.__BUILD_MANIFEST_CB()
\ No newline at end of file
+self.__BUILD_MANIFEST = (function(a,b,c,d){return {"/":[a,b],"/_error":[a,c,b],"/hooks":[a,c,b],"/index":[a,b],"/link":[a,c,d,b],"/routerDirect":[a,c,d,b],"/withRouter":[a,c,d,b]}}("static\u002Fruntime\u002Fwebpack-7928590be3ef2e55b835.module.js","static\u002Fruntime\u002Fmain-26f52093cd5cae22a02c.module.js","static\u002Fchunks\u002Fframework.cdb73e402d876d4ac87f.module.js","static\u002Fchunks\u002F24hvswtizmz9KJSLe9Kb2mlOa3c=.2da329b7caecfd217e7f.module.js"));self.__BUILD_MANIFEST_CB && self.__BUILD_MANIFEST_CB()
\ No newline at end of file

Serverless Mode (Increase detected ⚠️)
General Overall decrease ✓
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
buildDuration 25.6s 25.3s -256ms
nodeModulesSize 41.3 MB 41.2 MB -67.5 kB
Client Bundles (main, webpack, commons) Overall decrease ✓
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
main-HASH.js 18.2 kB 18.1 kB -107 B
main-HASH.js gzip 6.65 kB 6.63 kB -24 B
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
Overall change -107 B
Client Bundles (main, webpack, commons) Modern Overall decrease ✓
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
main-HASH.module.js 16.5 kB 16.5 kB -61 B
main-HASH.module.js gzip 6.37 kB 6.36 kB -11 B
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH.module.js gzip 746 B 746 B
Overall change -61 B
Client Pages
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
_app.js 1.9 kB 1.9 kB
_app.js gzip 908 B 908 B
_error.js 12.1 kB 12.1 kB
_error.js gzip 4.76 kB 4.76 kB
hooks.js 12.7 kB 12.7 kB
hooks.js gzip 4.81 kB 4.81 kB
index.js 343 B 343 B
index.js gzip 237 B 237 B
link.js 8.14 kB 8.14 kB
link.js gzip 3.49 kB 3.49 kB
routerDirect.js 433 B 433 B
routerDirect.js gzip 296 B 296 B
withRouter.js 444 B 444 B
withRouter.js gzip 294 B 294 B
Overall change
Client Pages Modern
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
_app.module.js 1.79 kB 1.79 kB
_app.module.js gzip 867 B 867 B
_error.module.js 23.3 kB 23.3 kB
_error.module.js gzip 8.62 kB 8.62 kB
hooks.module.js 1.55 kB 1.55 kB
hooks.module.js gzip 804 B 804 B
index.module.js 319 B 319 B
index.module.js gzip 238 B 238 B
link.module.js 8.52 kB 8.52 kB
link.module.js gzip 3.68 kB 3.68 kB
routerDirect.module.js 419 B 419 B
routerDirect.module.js gzip 294 B 294 B
withRouter.module.js 429 B 429 B
withRouter.module.js gzip 293 B 293 B
Overall change
Client Build Manifests Overall increase ⚠️
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
_buildManifest.js 81 B 81 B
_buildManifest.js gzip 61 B 61 B
_buildManifest.module.js 517 B 519 B ⚠️ +2 B
_buildManifest.module.js gzip 310 B 312 B ⚠️ +2 B
Overall change ⚠️ +2 B
Serverless bundles Overall decrease ✓
zeit/next.js canary Timer/next.js remove-flying-shuttle Change
_error.js 248 kB 248 kB -719 B
_error.js gzip 66.5 kB 66.5 kB ⚠️ +6 B
hooks.html 3.83 kB 3.81 kB -18 B
hooks.html gzip 991 B 981 B -10 B
index.js 249 kB 248 kB -844 B
index.js gzip 66.8 kB 66.6 kB -241 B
link.js 256 kB 255 kB -844 B
link.js gzip 69 kB 68.9 kB -73 B
routerDirect.js 249 kB 249 kB -844 B
routerDirect.js gzip 66.7 kB 66.7 kB -58 B
withRouter.js 249 kB 249 kB -844 B
withRouter.js gzip 66.8 kB 66.8 kB -53 B
Overall change -4.11 kB

@Timer Timer merged commit 847e892 into vercel:canary Aug 20, 2019
@Timer Timer deleted the remove-flying-shuttle branch August 20, 2019 15:08
@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.

3 participants