92 points · by selamis · 13y ago · 38 comments
He talks about it here → http://www.youtube.com/watch?v=E9FxNzv1Tr8#t=600
I'm not saying it's a bad idea, but starting with a case study would be nice rather than jumping in with "we've completely changed everything about how script files are delivered, it's amazing and we have cool graphics to prove it". The dinosaur looks a bit hand-wavy.
There are a lot more moving parts, a lost more surface area for things to go wrong, etc. Yes, downloading huge JS files is a problem, but you're going to have to download them one way or another.
Most with absolutely zero data to back up that it provides any sort of useful improvements to justify the difficulties it introduces in debugging.
Considering how almost all web-servers and browsers support HTTP compression, minification is mostly a cargo-cult ritual.
jquery-2.0.3.js 236K
jquery-2.0.3.js.gz 70K
jquery-2.0.3.min.js 82K
jquery-2.0.3.min.js.gz 29K
Minification pay off a lot even with compression.While it depends on a lot of factors, generally speaking minification is a good thing especially for mobile. There's really no downside in doing it (see next point).
> justify the difficulties it introduces in debugging
What difficulties? You should use a build process that minifies for your production site but not for testing. If you need to debug the live, minified files you can use source maps[1].
1: http://www.html5rocks.com/en/tutorials/developertools/source...
A quick google search got me to SO: http://stackoverflow.com/a/807161 results seem pretty significant. Besides, the worse your connection is, the more you will appreciate these techniques.
The packaging and minification can be handled either as a filter at the server level or during the build and deploy if your stack supports that metaphor. These have been the common practices in my experience.
BTW, how does differential updates do under minification? Don't the differences usually end up replacing the entire functions?
Don't minify. Minifying is a kludge. This (and gzip) actually looks like a properly engineered solution.
So if you can't use a CDN or your cache hit rates are much lower, you might end up with slower page loads with technique. But of course I have no data to back this up.
The Tragedy of the RProxy: http://ozlabs.org/~rusty/rproxy.html
Great! We already do this manually for mobile sites so I will definitely try it out.
> and serve differential updates
I didn't understand this part.
But this is in case you have a bigger JS-File (e.g. for a Web-App) and your customer visit again, so you only have to transfer a small peace of data.
But iam not sure if the performance / traffic advantage is so high, that dyno justify the effort. And you have one more source of possible error, so i did not think many developer will use it.
The idea is good, but the solution should work automatically in background on the transportation layer, between browser and server, not for app developer.
@Jason Anderson: Call google - chrome developer if they implement it in their Browser and write an apache Plugin ! :-)