5 ms·
>Modern websites in particular often have large JavaScript bundles - the front page of CertSimple is 242 K gzipped, and would be 1.1MB uncompressed! Mike, I’m
by tzahola 8y ago
>Modern websites in particular often have large JavaScript bundles - the front page of CertSimple is 242 K gzipped, and would be 1.1MB uncompressed!
Mike, I’m afraid you have bigger problems than inefficient compression...
- nailer 8y agoCertSimple is a fairly complex web app with a bunch of ractive components that use webcrypto (requiring ASN1, PKI libraries etc) and URLs (using a WhatWG URL polyflll) which takes up a large chunk of the bundle. We use https://github.com/131/discify https://github.com/131/discify to analyse this and should be able to cut down a little further once the URL spec is more widely implemented.
- k__ 8y agoAre you doing code splitting? If not, this would be my first target for gains :)
- nailer 8y agoSeperate bundles for different parts of the app, but not doing lazy loading or anything like that. Might look at it again if/when ES6 modules ever become popular (I just built a smaller project (https://mikemaccana.com https://mikemaccana.com) using ES6 modules and right now the lack of ES6 modules on npm makes any gains from tree shaking not worth the productivity loss). Perf is always fun to optimise, but we're got features customers want that we need to work on first!
- jbergstroem 8y agoThis together with cache-control: immutable is a great bandwidth saver: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Ca...
- lucideer 8y agoIf you're interested in analysing CertSimple performance, removing the artificial 8s delay on the CertSimple blog might be another line of inquiry. animation:-amp-start 8s steps(1,end) 0s 1 normal both
- nailer 8y agoBlog performance is also decent - on all platforms (including desktop), you're viewing an AMP page, so the only js is AMP itself. I don't know specifically what amp.js is doing there with the animation but since the entire purpose of AMP is performance, I'm sure there's a solid motivation behind it.
- detaro 8y agoIt's so users don't get to see the horror that's the non-JS-ified view of the page before the AMP scripts kick in. Pretty bad reasoning for something so annoying in my book.
- lucideer 8y ago> I don't know specifically what amp.js is doing there with the animation The snippet I posted is a small bit of inline CSS at the top of your page that hides all page content for 8s. There is no JS involved, and the mechanism is quite clear if you know CSS. > the entire purpose of AMP is performance I'm afraid you are sorely mistaken. (See the comments on any AMP-related HN submission if this is news to you). > I'm sure there's a solid motivation behind it. What makes you so sure? The motivation is to artificially degrade the experience for any users that choose to block 3rd-party AMP tracking scripts. There is no other reason behind it. > I don't know specifically what amp.js is doing Normally, one can overlook people throwing random 3rd-party scripts into their blog with no clue what they do, but for someone blogging about using brotli and commenting about applying discify, this kind of wilful ignorance is a little ironic. Particularly after someone points out that there is an 8s delay in your page load.
- nailer 8y ago> The snippet I posted is a small bit of inline CSS at the top of your page that hides all page content for 8s. There is no JS involved No, the inline CSS is added by amp.js. > > the entire purpose of AMP is performance > I'm afraid you are sorely mistaken (See the comments on any AMP-related HN submission if this is news to you). I wrote a bunch of those comments. Now Malte is allowing people to host AMP content on their own domains I trust it a little more. > The motivation is to artificially degrade the experience for any users that choose to block 3rd-party AMP tracking scripts. AFAIK amp.js doesn't do any tracking on it's own - you need an analytics module to do that. Do you know differently? > > I don't know specifically what amp.js is doing > this kind of wilful ignorance is a little ironic Not really. Do you know your CPU microcode well or would you consider yourself wilfully ignorant? Perhaps rather than being wilfully ignorant, I choose to focus my time on what matters to my customers (with a side of arguing on Hacker News).