[darcs-users] [patch87] Avoid a redundant read of pending in State.hs
Jason Dagit
bugs at darcs.net
Mon Nov 16 00:57:26 UTC 2009
New submission from Jason Dagit <dagitj at gmail.com>:
Hello,
I sent a patch just like this to Petr back on Mon, Sep 28, 2009, but
it was not applied. I don't know why. Petr, was there some problem
with the changes below? Note: I did have to recreate the patch
because it was not applicable against HEAD due to an unrename of the
darcs.cabal file (some odd patch dependency issue).
Here is the description of why I created this patch:
[this] patch is a refactor that gives a pretty substantial
performance boost. I haven't necessarily implemented it in the best
mananer, just the simplest.
We were effectively constructing the sequence of pending patches
twice, or at least some of them.
With profiling enabled:
Before this change:
322 MB total memory in use (2 MB lost due to
fragmentation)
Total time 61.23s ( 65.00s elapsed)
After this change:
245 MB total memory in use (2 MB lost due to
fragmentation)
Total time 48.28s ( 59.95s elapsed)
Normal builds:
Before this change:
223 MB total memory in use (2 MB lost due to
fragmentation)
Total time 14.50s ( 16.17s elapsed)
%GC time 25.0% (24.8% elapsed)
Productivity 75.0% of total user, 67.3% of total elapsed
After this change:
174 MB total memory in use (1 MB lost due to
fragmentation)
Total time 12.52s ( 14.01s elapsed)
%GC time 22.8% (22.4% elapsed)
Productivity 77.2% of total user, 69.0% of total elapsed
So, it seems to save about 2 seconds of runtime, and close to 50
megs of physical ram.
Please let me know if you have questions! It's much much better
performance now on this particular use case than the darcs.net source,
which uses over 400 megs of ram and takes closer to a minute.
Thanks,
Jason
Sun Nov 15 16:53:12 PST 2009 Jason Dagit <dagit at codersbase.com>
* Avoid a redundant read of pending in State.hs
----------
files: avoid-a-redundant-read-of-pending-in-state_hs.dpatch, unnamed
messages: 9378
nosy: dagit, darcs-users
status: needs-review
title: Avoid a redundant read of pending in State.hs
__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/patch87>
__________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: avoid-a-redundant-read-of-pending-in-state_hs.dpatch
Type: text/x-darcs-patch
Size: 57350 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-users/attachments/20091116/88406356/attachment-0001.bin>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: unnamed
URL: <http://lists.osuosl.org/pipermail/darcs-users/attachments/20091116/88406356/attachment-0001.diff>
More information about the darcs-users
mailing list