[darcs-users] darcs patch: Add LANGUAGE pragmas for explicit langua... (and 6 more)
Ganesh Sittampalam
ganesh at earth.li
Mon Oct 27 21:34:36 UTC 2008
I'm not submitting these for inclusion right now, but I just
wanted to get a bit of feedback.
The work is motivated by issue711, where darcs whatsnew -ls is
slow on a large tree. A simple experiment with a directory
with a large number of files in it showed quadratic blowups
in the slurpy code, and in speedy_commute. Here I'm trying to
address the slurpy code. The basic idea is to switch over
from storing the files in a directory in a list, to using
Data.Map.
The potential downside is that Data.Map might be slower
than lists for small directories. So ideally this should
be benchmarked to work out whether it really is an issue
or not. I'm not certain when I'll get a chance to do that,
so if anyone else has time, that'd be great. Alternatively,
we could do without benchmarking, on the basis that any
slowdown would probably be small, and would be outweighed
by making darcs scale better.
Patch-by-patch commentary follows:
I depend on this patch from the sprint branch (by bad luck really),
which breaks on 6.6 and will be fixed up before the Portland guys
submit it:
Sun Oct 26 00:01:40 BST 2008 Don Stewart <dons at galois.com>
* Add LANGUAGE pragmas for explicit language extensions
This patch should leave behaviour unchanged, but exposes the
fact that both SlurpFile and SlurpDir specify a filename by
lifting it into a common place:
Sun Oct 26 12:37:22 GMT 2008 Ganesh Sittampalam <ganesh at earth.li>
* refactor Slurpy to common up name component between File/Dir
This switches SlurpDir over to using a Data.Map. This means that
files will always be in lexicographic order in each directory.
It does things in a dumb way, just switching back to [Slurpy] in
any place that actually wants one.
Sun Oct 26 13:59:06 GMT 2008 Ganesh Sittampalam <ganesh at earth.li>
* dumb changeover of SlurpDir contents from [] to Map
Some simple changes to actually make use of the fact that
we now have a Map:
Sun Oct 26 15:37:49 GMT 2008 Ganesh Sittampalam <ganesh at earth.li>
* make use of the SlurpyDir Map in the obvious places
Sun Oct 26 18:55:18 GMT 2008 Ganesh Sittampalam <ganesh at earth.li>
* bug fix
Sun Oct 26 19:27:15 GMT 2008 Ganesh Sittampalam <ganesh at earth.li>
* another obvious use of the SlurpyMap
Sun Oct 26 20:04:42 GMT 2008 Ganesh Sittampalam <ganesh at earth.li>
* simplify slurp_has_anycase
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/x-darcs-patch
Size: 117780 bytes
Desc: A darcs patch for your repository!
Url : http://lists.osuosl.org/pipermail/darcs-users/attachments/20081027/b3923572/attachment-0001.bin
More information about the darcs-users
mailing list