darcs

Issue 1005 "darcs changes" reads pristines in darcs2

Title "darcs changes" reads pristines in darcs2
Priority bug Status resolved
Milestone Resolved in
Superseder Nosy List darcs-devel, dmitry.kurochkin, kowey, mornfall, nwf, thorkilnaur
Assigned To nwf
Topics Performance

Created on 2008-08-16.06:07:32 by nwf, last changed 2010-03-23.19:02:28 by kowey.

Messages
msg5549 (view) Author: nwf Date: 2008-08-16.06:07:30
"darcs changes" reads pristine files, despite having no real business doing so;
to verify, run "darcs changes --debug-verbose"; you should get output like:

Beginning identifying repository .
Done identifying repository .
Identified darcs-2 repo: /home/nwf/tmp/dtest/base.BUSTED.2
Looking for unrecorded changes...
Beginning reading pristine
Reading hash file
0000000472-256877a1618f656ab57ffbcf6e909e479818f0fb29bd6a5f3fe49b17d92bc64e from
pristine.hashed/
I'm doing copyFileUsingCache on
pristine.hashed/0000000472-256877a1618f656ab57ffbcf6e909e479818f0fb29bd6a5f3fe49b17d92bc64e

Tested against a darcs2 repository format; don't know about older formats.
Anyway, this seems simply a waste of time and probably should be fixed?
msg5563 (view) Author: droundy Date: 2008-08-17.14:19:18
This most likely indicates a laziness bug... that is, a buggy lack of laziness.
 Reading the pristine cache *should* be 100% lazy, which means that if we try to
read it but don't use it, it shouldn't be read at all.  I'm just not sure
whether it's a bug in the reading of the pristine cache, or in the using of it.
 We need to read it if we are called with 'darcs changes -v -u', so we can
provide context.
msg8075 (view) Author: kowey Date: 2009-08-10.16:14:16
Hi Petr. Is this fixed in darcs-hs?
msg8078 (view) Author: mornfall Date: 2009-08-10.18:15:36
Actually, I don't think I touched changes. But I recall someone else fixing
this for 2.3, let's see.

Ok, changes does a get_unrecorded_in_files_unsorted (on mainline), but
nowadays, this only happens when we actually get some filenames on the
commandline. In darcs-hs, this also uses index, so should be negligible time-

I also happen to think it would be enough to only read pending, but I can't
verify that right now. Either way, things should be pretty OK on the
performance front. I think you can close this (unless you want to investigate
only reading pending, which would of course be a little more efficient).
msg8080 (view) Author: kowey Date: 2009-08-10.21:28:34
Thanks Petr.

Nathaniel, could you confirm if Darcs 2.3 avoids this problem?
msg10464 (view) Author: kowey Date: 2010-03-23.17:53:24
Hmm, no updates in over 6 months, so I'm marking this presumed-dead. 
Nathaniel, if you could give us an update, we can resolve this properly.
 If not, we'll just leave it at that.  Thanks!
msg10467 (view) Author: nwf Date: 2010-03-23.18:43:35
This does indeed appear to be fixed; thanks.

--nwf;
History
Date User Action Args
2008-08-16 06:07:32nwfcreate
2008-08-17 14:19:20droundysetstatus: unread -> unknown
nosy: + droundy
messages: + msg5563
2009-08-06 17:59:45adminsetnosy: + markstos, jast, Serware, dmitry.kurochkin, darcs-devel, zooko, mornfall, tommy, simon, kowey, thorkilnaur, - droundy, nwf
2009-08-06 21:11:13adminsetnosy: - beschmi
2009-08-10 12:54:59adminsetnosy: + nwf, - tommy, markstos, darcs-devel, zooko, jast, Serware, mornfall
2009-08-10 16:12:00koweysettopic: + Performance
nosy: kowey, dagit, simon, thorkilnaur, dmitry.kurochkin, nwf
2009-08-10 16:14:19koweysetstatus: unknown -> waiting-for
nosy: + mornfall
messages: + msg8075
assignedto: mornfall
2009-08-10 18:15:38mornfallsetnosy: kowey, dagit, simon, thorkilnaur, dmitry.kurochkin, nwf, mornfall
messages: + msg8078
2009-08-10 21:28:37koweysetnosy: kowey, dagit, simon, thorkilnaur, dmitry.kurochkin, nwf, mornfall
messages: + msg8080
assignedto: mornfall -> nwf
2009-08-10 23:42:39adminsetnosy: - dagit
2009-08-25 18:09:08adminsetnosy: + darcs-devel, - simon
2009-08-27 14:22:21adminsetnosy: kowey, darcs-devel, thorkilnaur, dmitry.kurochkin, nwf, mornfall
2010-03-23 17:53:26koweysetstatus: waiting-for -> given-up
messages: + msg10464
2010-03-23 18:43:37nwfsetmessages: + msg10467
2010-03-23 19:02:28koweysetstatus: given-up -> resolved