本文主要是介绍bsdiff| google-diff-match-patch | metro-bundle 文件差异分析工具性能比对,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
## 项目目的源于在做 React Native 包拆分的需求时,比较 bsdiff 和 google-diff-match-patch 在生成差量文件上的性能差异。- bsdiff (http://www.daemonology.net/bsdiff/) - google-diff-match-patch (https://github.com/bystep15/google-diff-match-patch) - metro-bundle(https://facebook.github.io/metro/)## 实验数据- Hello World 工程中的 jsbundle 对比| 工具名称 | bsdiff | google-diff-match-patch | metro-bundle | | --------------------------- | ------------- | ----------------------- | ------------- | | Common 包 | 764,797 bytes | 764,797 bytes | 764,797 bytes | | HelloWorld 完整包 | 767,338 bytes | 767,338 bytes | 767,338 bytes | | HelloWorld 业务补丁 (patch) | 1,324 bytes | 42,891 bytes | 2,783 bytes | | 拆分时间 (diff time) | 1,042 ms | 2,410 ms | - | | 合并时间 (patch time) | 32 ms | 258 ms | - |
这篇关于bsdiff| google-diff-match-patch | metro-bundle 文件差异分析工具性能比对的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!