-
Committer:
John Arbash Meinel
-
Date:
2011-05-10 14:12:11 UTC
-
mto:
This revision was merged to the branch mainline in
revision
5848.
-
Revision ID:
john@arbash-meinel.com-20110510141211-2ptj7bi4piziiel8
DirState._sort_entries was showing up for 'uncommit' times.
This shaves a consistent 500ms off of 'uncommit' (from 15.6s to 15.1s) in
a 70k-entry tree. Basically, we cache the results of path.split('/')
rather than re-doing it for every file in every directory.
I tried implementing it via a cmp() function, to avoid split entirely
(since we have cmp_by_dirs). That seemed to make it significantly
slower, probably because of cmp() call overhead vs key.
Small win, but small change.