[darcs-users] darcs patch: Optimize clean_hashdir's use of cleanCaches.

Petr Rockai me at mornfall.net
Tue Oct 7 19:18:58 UTC 2008


Hi,

I am attaching a first shot at indirectly optimizing hashed repair: the patch
should drastically limit amount of work wasted on cleaning the caches by
passing a list of files that might need to be removed to cleanCaches, which
then only looks at that, instead of skimming through everything in the global
cache. This should save some cycles, although I have no numbers to back that
up. Moreover, the patch as it is is largely untested (just a make check and a
quick test that the idea helps things), but I am in a hurry (again), so please
review carefully. I will try to revisit this soon.

(Next comes trimming down memory usage, we have discussed that at length on IRC
today with Kowey. I'll investigate, hopefully in the course of this week.)

Yours,
   Petr.

Tue Oct  7 21:12:37 CEST 2008  Petr Rockai <me at mornfall.net>
  * Optimize clean_hashdir's use of cleanCaches.
  
  We now only ask cleanCaches to look at files we have unlinked and therefore
  might have caused their cached equivalents to drop link-count to 1. Limits
  number of stats to O(n), n = number of cleaned out files.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/x-darcs-patch
Size: 3852 bytes
Desc: A darcs patch for your repository!
Url : http://lists.osuosl.org/pipermail/darcs-users/attachments/20081007/cebe9014/attachment.bin 


More information about the darcs-users mailing list