3 ms·
Wouldn't that screw up the diff as well?
by geon 13y ago
Wouldn't that screw up the diff as well?
- borplk 13y agoNot 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)
- afandian 13y agoIf 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.
- michaelmior 13y agoAgreed this is a problem. Although perhaps it's worth not minifying your JS to gain the speedup from the use of diffs?
- pedrocr 13y agorsync requires a lot of communication back and forth which is precisely what you're trying to avoid. You want to fire off a single diff in a single roundtrip.
- wavefunction 13y agoYou 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.