
25 Nov
2006
25 Nov
'06
2:31 a.m.
On Sat, Nov 25, 2006 at 02:34:21AM +0100, Udo Stenzel wrote:
Pathnames are short strings. No need to optimize for performance, instead optimize for clarity.
There have been times in darcs where the performance of path names was an issue. For example, running "darcs whatsnew" in a large repository with no changes was taking a few seconds, I think (which doesn't sound very long, but feels like an age when you are waiting for the prompt to appear). I was able to cut it down to something almost unnoticable by optimising (and thus losing clarity), but I think the code would have been both faster and clearer had a suitable bytestring-like file path representation been available. Thanks Ian