请教下熟悉 diff 算法的同学, 我场景是连接 Git 服务器速度不是很快,
现在有考虑在本地完成 JS 代码压缩, 然后再部署到服务器上.
那么如果我的 JS 压缩代码只有一行, 当文件发生改变, diff 产生的数据量大不大?
另外 JS 压缩后代码是否放在 repo 里, 这个是怎么考虑的?
大家讲道理2017-04-22 09:02:19
If you are concerned about the amount of data, don’t put it in. This has little to do with the diff algorithm and has a lot to do with git's pack and transmission. Reference: http://git-scm.com/book/zh/Git-%E5%86%85%E9%83%A8%E5%8E%9F%E7%90%86-Packfiles
In addition, I don’t know if the results of minifying your JS source code multiple times using the tool you are using are similar.