[darcs-users] darcs patch: resolve issue777: reduce memory usage of darcs put

Reinier Lamers tux_rocker at reinier.de
Thu May 22 12:07:45 UTC 2008


Op 22-mei-2008, om 12:04 heeft David Roundy het volgende geschreven:

> On Wed, May 21, 2008 at 07:28:22PM +0200, tux_rocker at reinier.de wrote:
>> Wed May 21 00:16:31 CEST 2008  tux_rocker at reinier.de
>>   * resolve issue777: reduce memory usage of darcs put
>>
>>   I did it by creating an incremental version of the SHA-1  
>> function. I have to
>>   make some unit tests for it, because I don't trust such an  
>> important function
>>   without those.
>
> Did you actually test that this affects the memory use of put? It'd  
> greatly
> surprise me if it affected our memory use by more than a couple of  
> percent,
> and for such a small gain, I'm not convinced it's worth the  
> complexity.  Of
> course, it could also either improve or hurt the cpu time used in  
> put and
> apply, and I'd be interested in knowing which effect it has.
Your scepticism is entirely justified: when I tested a darcs with my  
patch against darcs 2.0.0 on OS X, the version with my patch used a  
similar amount of memory (300 to 340 MB), but took much more CPU time  
(1m 38s user (average of two runs) versus 24.5s (average of four  
runs)). So my perceived great results were either because I compiled - 
fvia-C (to avoid http://hackage.haskell.org/trac/ghc/ticket/1993),  
because I had enabled profiling, or because the memory behavior is  
wildly different on Linux and OS X, or because I did something  
completely braindead. I'm going to try and find out which one was the  
cause.

Regards,
Reinier


More information about the darcs-users mailing list