Bazaar 的改进

Bazaar 的性能,包括空间和时间上的性能一直在改进:

  • 1.0,Pack Format(pack-0.92):之前是 Knit 格式,Pack 就是将这些放在一起,提高了存储效率,大概有 10-15% 的改进,速度上也有所提高。
  • 1.6,Stacked Branch(1.6):在上次的演讲中提到一个 DVCS 的一个缺点是需要把所有的历史全部拿到,但大多数情况之下只需要很少的一部分版本历史就足够了,久远的历史可能没有必要拿下来,空间时间都要多耗费。所以就有了这个需求,但也不仅仅是这个需求,Jonathan Lange(Bazaar 开发者) 的[一篇博文]指出对于提供代码存储服务(比如 [LaunchPad])的提供商来说,也会极大地减少空间占用。我自己还没有用到这个功能。详细情况请参见其[详细说明]以及 John Arbash Meinel(Bazaar 开发者)的[博文]
  • 1.9,BTree Index(1.9):对于文件很多历史很长的项目来说,即使是索引也很大,所以这个改进进一步提高了索引的性能,并减少了索引所占用的空间,30%-40% 的改进。
  • 1.13,Views:在演讲中提到 DVCS 的另一个缺点是工作树的大小。因为是针对整个树做版本控制,所以用户也必须把所有的目录和文件都拿出来,而不是自己所关心的一小部分,尤其是在多个工作树的情况下,磁盘空间占用也很可观。视图支持,目的就是让用户只关注于现在关心的部分目录和文件,让 statuscommitdiff 等很多命令只显示或者操作视图中的文件,很多时候就不用指定具体的目录或者文件了。更多详细信息请查看官方文档,首先要将工作树的格式升级 bzr upgrade --development-wt5,这一步只需要在含有工作树的 checkout 或者分支中做就可以了。

    刚开始看到这个特性的时候,以为会把其他的目录和文件在磁盘上删除掉,这样会减少工作树的大小,减少空间占用。没想到仅仅是个“视图”,可以考虑把这个功能加上。

  • 将来:下一个大的改动将是 [brisbane-core],将是下一代的仓库存储格式,进一步减少空间占用(估计可以减少到 Pack 的 1/3),提高速度。看起来很不错。具体可以参见官方文档以及 John Arbash Meinel 的[博文]

有所改进总是好的,但是每次改动都需要用户做一次升级,如果有很多开发者并且分支很多的话,非常不方便。这也是 Bazaar 受到诟病最多的一个方面。

以下是我自己的一些测试,主要关注在空间占用上:

特征/项目 Project-A Project-B Project-C
项目特征
工作树大小 123M 215M 86M
文件数量 2154 3123 316
目录数量 208 603 36
版本数量 813 645 553
Knit
branch 时间 1m44s 4m9s 1m31s
checkout 时间 46.4s 1m50s 16s
总大小 106M 317M 200M
索引大小 1.2M 1.7M 724K
数据大小 105M 315M 199M
Pack
branch 时间 9.6s 37s 19s
checkout 时间 37.2s 56s 13.8s
总大小 89M 285M 195M
索引大小 620K 992K 344K
数据大小 88M 284M 195M
BTree Index
branch 时间 9.4s 28s 13s
checkout 时间 28.6s 59s 13.7s
总大小 89M 285M 195M
索引大小 252K 356K 160K
数据大小 88M 284M 195M

answer

I had got a desire to start my organization, but I didn't earn enough amount of money to do this. Thank goodness my close mate advised to utilize the personal loans. So I received the consolidation loans and realized my dream.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <blockquote>
  • You can use BBCode tags in the text.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>. The supported tag styles are: <foo>, [foo].
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
   ____                 ____   __     __  _      ____          
/ ___| ____ __ _ | _ \ \ \ / / | | __ / ___| _ __
| | _ |_ / / _` | | | | | \ \ / / | |/ / \___ \ | '_ \
| |_| | / / | (_| | | |_| | \ V / | < ___) | | | | |
\____| /___| \__, | |____/ \_/ |_|\_\ |____/ |_| |_|
|_|
Enter the code depicted in ASCII art style.