Don't screen it yet.
Darcs is doing a lot of path normalization internally, and this appears
as a lot of memory consumption at patch index creation time, which is
an operation that requires to read and parse many patches at once.
This patch makes normPath avoid splitting and reconstructing paths
by first checking whether the path needs normalization (apart
from dropping initial ./'s and /'s, which can be done quickly).
I should measure how many strings are effectively normalized at
patch index creation before pushing this. In the meantime this makes
us go from:
total time = 5.87 secs (5874 ticks @ 1000 us, 1 processor)
total alloc = 4,112,933,336 bytes (excludes profiling overheads)
to:
total time = 5.73 secs (5734 ticks @ 1000 us, 1 processor)
total alloc = 3,831,387,200 bytes (excludes profiling overheads)
when creating PI on darcs.net.
1 patch for repository http://darcs.net:
patch 01d507421104a74a131148c12ac6868c4173ba8b
Author: Guillaume Hoffmann <guillaumh@gmail.com>
Date: Mon Nov 10 18:30:03 ART 2014
* make Darcs.Util.Path.normPath cheaper on well formed paths
Attachments
|