pure-python mercurial
Mads Kiilerich
mads at kiilerich.com
Thu Mar 5 05:17:45 CST 2009
Weijun Wang wrote:
> I though it's the commit command which is slow.
Commit might be slow, but that is not related to base85.
Weijun Wang wrote:
> TK Soh wrote:
>
>> On Thu, Mar 5, 2009 at 5:57 AM, Weijun Wang <Weijun.Wang at sun.com> wrote:
>>
>>> TK Soh wrote:
>>>
>>>> I am actually using this changeset. BTW, does it only affect commit as
>>>> Weijun said?
>>>>
>>> Well, what do you expect to see from diff of a binary file?
>>>
>> The true is I don't know what to expect, since I don't know where
>> base85 hits. But doing benchmarking with diff is much easier than
>> commit for me.
>>
>
> Base85 is an encoding method to change a binary file into an ASCII file.
> It's used when you have a binary file in your repo. I also don't know
> exactly when the encoding/decoding is performed.
>
Base85 is _only_ used when generating --git diffs/patches (introduced in
http://www.selenic.com/hg/index.cgi/rev/7f486971d263). So the practical
relevance of this is quite limited.
(FWIW, a micro-benchmark of base85 encoding:
python -m timeit -c 'import base85; base85.b85encode("x"*10000)'
)
But as long as we don't have any realistic benchmarks this is just
hand-waving with a high risk of introducing premature optimization.
(It seems like running the full test suite with pure python isn't
"significantly" slower than usual. Probably becuase it uses small repos
and has other bottlenecks. YMMV.)
/Mads
More information about the Mercurial
mailing list