darcs

Issue 2293 Patch index update reads too much

Title Patch index update reads too much
Priority Status resolved
Milestone Resolved in
Superseder Nosy List ganesh
Assigned To ganesh
Topics PatchIndex

Created on 2013-01-24.07:00:46 by ganesh, last changed 2019-07-12.21:51:18 by ganesh.

Messages
msg16550 (view) Author: ganesh Date: 2013-01-24.07:00:43
Updating the patch index is reading too far back in history, which is slow and 
won't interact well with lazy repos.

I first noticed this problem with amend-record but it probably exists with any 
command that adds or changes local patches.

The problem can be seen by working on a repository where the files in 
_darcs/inventories have been removed, and trying to amend-record a patch that's 
after the last clean tag. Without the patch index, darcs correctly updates the 
path without needing to visit the missing inventories. With the patch index it 
tries to read them and crashes. (As well as deleting the inventories from the 
local repo, they need to be deleted from the global cache or darcs just finds them 
again there).

I'll send a test case to illustrate this directly.
msg16552 (view) Author: ganesh Date: 2013-01-24.17:31:26
See patch1016
msg16559 (view) Author: ganesh Date: 2013-01-27.22:27:02
Actually this may not be a laziness issue per se, since the patch index 
isn't intended to be used with lazy repos in its current form. It is 
however a performance issue; it's adding 50 seconds to each amend-record 
on my laptop!

I've started a general design discussion on the changes needed at 
http://lists.osuosl.org/pipermail/darcs-devel/2013-January/014735.html
msg16664 (view) Author: ganesh Date: 2013-02-17.00:09:07
It looks like the extreme slowness only comes up on a very slow hard 
drive, such as the one my laptop until I replaced it with a SSD recently 
:-)

I therefore don't think this is such a priority any more, though it 
would certainly be nice to fix it.
msg16725 (view) Author: gh Date: 2013-02-24.22:47:20
See http://lists.osuosl.org/pipermail/darcs-devel/2013-
February/014926.html .
msg20759 (view) Author: bf Date: 2019-06-12.15:59:18
Is this still an issue to you? The tests succeed and complete very 
fast on my machine.
msg20917 (view) Author: ganesh Date: 2019-07-12.21:51:16
The issue2293 test passes for me on screened too, so I'm closing this.
History
Date User Action Args
2013-01-24 07:00:46ganeshcreate
2013-01-24 17:31:28ganeshsetmessages: + msg16552
2013-01-27 22:27:05ganeshsetmessages: + msg16559
2013-02-17 00:09:08ganeshsetmessages: + msg16664
milestone: 2.10.0 ->
2013-02-24 22:47:22ghsetmessages: + msg16725
2019-06-12 15:59:20bfsetmessages: + msg20759
2019-07-12 21:51:18ganeshsetstatus: needs-diagnosis/design -> resolved
messages: + msg20917