RFC: startup time - again
bialix at ukr.net
Wed Sep 10 05:44:28 BST 2008
David Cournapeau пишет:
> John Arbash Meinel wrote:
>> Actually, they do. Last I checked they had several required C
>> extensions. (The
>> diff and patch code is in C, I don't remember what else off-hand.)
> I know that, but we have not talked about diff and patch in this thread
> :) For what we are talking about here (slow startup, slow st on small
> trees), I doubt that C is involved in the factor 2/3 between hg and bzr
> for startup time (on Linux at least).
> I see 5 files in C in mercurial 1.0.1:
> osutils implements one function to list directories (on posix only it
> seems), I don't know what base85.c is about.
IIUC hg used base85 encoding for bundles and binary diffs.
>> Some of the other things, are arguable choices along the way. For
>> example, bzr
>> works in Unicode paths. This means that we take more time (and generally
>> memory) as we decode from 8-bit strings into Unicode strings. On the flip
>> side, it means that when I check it ",H,H.txt" on Linux, I get the
>> same thing
>> on Windows and Mac, rather than "Ø¬ÙØ¬Ù.txt" (On Windows it will
>> default to
>> something like cp1250/latin-1 for 8-bit filenames, while on Linux it
>> is UTF-8,
>> even though Windows is actually a "wide-char" or UTF-16 filesystem.)
> Yes, that's a great poinf of bzr here, but I fail to see how this
> explains slow startup time.
More information about the bazaar