Re:DynoSRC - Eliminate HTTP requests for JavaScript files
by geon on Thursday November 28, 2013 @06:21AM
(#6814089)
Wouldn't that screw up the diff as well?
[ Parent
| on HN ]
Re:DynoSRC - Eliminate HTTP requests for JavaScript files
by wavefunction on Thursday November 28, 2013 @07:24AM
(#6814237)
You don't commit the packaged and minified code to your repo. Instead, you leave it in whatever number of source files you want to use (which are file repo'd).
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.
Re:DynoSRC - Eliminate HTTP requests for JavaScript files
by borplk on Thursday November 28, 2013 @06:31AM
(#6814120)
Not an expert on this, but could something like rsync be implemented and allow it to treat the file as binary? (e.g. minified or non-minified doesn't matter)
Re:DynoSRC - Eliminate HTTP requests for JavaScript files
by afandian on Thursday November 28, 2013 @06:42AM
(#6814135)
If the minifcation involves symbol substitution, the substitutions are going to depend on the content of the whole file.
So unless you re-implement the minification algorithm to be optimised for minimising diffs you might find that every variable's name has changed and size of the file diff might start to approach (or exceed) the size of the file itself.
Re:DynoSRC - Eliminate HTTP requests for JavaScript files
by michaelmior on Thursday November 28, 2013 @08:55AM
(#6814471)
Agreed this is a problem. Although perhaps it's worth not minifying your JS to gain the speedup from the use of diffs?