darcs

Issue 1073 pending changepref patche affects whatsnew -l performance (2.0.2)

Title pending changepref patche affects whatsnew -l performance (2.0.2)
Priority bug Status given-up
Milestone Resolved in
Superseder Nosy List claus.reinke, darcs-devel, dmitry.kurochkin, kowey, thorkilnaur
Assigned To
Topics Performance, ThePendingPatch

Created on 2008-09-12.15:39:41 by claus.reinke, last changed 2017-07-30.23:04:57 by gh.

Files
File name Uploaded Type Edit Remove
.darcs-subrepos claus.reinke, 2008-09-12.15:39:38 application/octet-stream
Messages
msg5994 (view) Author: claus.reinke Date: 2008-09-12.15:39:38
Continuing the adventures from issue534, now with darcs 2.

The idea is to use 'darcs whatnew -l' to find generated files in a
ghc repo tree. I can't just use '--boring' because we still want to 
ignore sub-repos and some other stuff, so I have an alternative 
shortened boringfile (attached) for this task.

What happens is that 

- after 'darcs setpref boringfile .darcs-subrepos',
   'darcs whatsnew -l' gets stuck, and has to be interrupted
- after just copying '.darcs-subrepos' over '.darcs-boring' instead,
    'darcs whatsnew -l' is able to make progress

$ darcs query repo
          Type: darcs
        Format: darcs-1.0
          Root: d:/fptools/ghc
      Pristine: PlainPristine "_darcs/pristine"
         Cache: thisrepo:d:/fptools/ghc
boringfile Pref: .darcs-boring
        Author: claus.reinke
Default Remote: http://darcs.haskell.org/ghc
   Num Patches: 19466

First copy '.darcs-boring' somewhere safe, then copy 
'.darcs-subrepos'  to '.darcs-boring'

$ darcs --version
2.0.2 (+ 76 patches)

$ time darcs wh -l -v --debug | head
Beginning identifying repository .
Done identifying repository .
Identified darcs-1 repo: d:/fptools/ghc
Looking for unrecorded changes...
Found unrecorded changes.
Looking for unrecorded changes...
Found unrecorded changes.
diffing dir...
diffing dir...
M ./.darcs-boring -249 +52
M ./darcs-all -2 +68
a ./compiler/cmm/CmmLex.hs
a ./compiler/cmm/CmmParse.hs
a ./compiler/dist-stage1/
a ./compiler/dist-stage1/build/
a ./compiler/dist-stage1/build/AsmCodeGen.hi
a ./compiler/dist-stage1/build/AsmCodeGen.o

real    1m13.265s
user    0m0.346s
sys     0m0.198s

$ darcs setpref boringfile .darcs-subrepos
Changing value of boringfile from '.darcs-boring' to '.darcs-subrepos'

$ time darcs wh -l -v --debug | head
Beginning identifying repository .
Done identifying repository .
Identified darcs-1 repo: d:/fptools/ghc
Looking for unrecorded changes...
withSignalsHandled: Interrupted!
diffing dir...

real    2m37.272s
user    0m0.378s
sys     0m0.213s

$ uname -a
CYGWIN_NT-5.1 cr3-lt 1.5.25(0.156/4/2) 2008-06-12 19:34 i686 Cygwin

$ diff .darcs-boring .darcs-subrepos

Claus
Attachments
msg5995 (view) Author: kowey Date: 2008-09-12.16:37:22
On Fri, Sep 12, 2008 at 15:39:42 -0000, Claus Reinke wrote:
> $ darcs setpref boringfile .darcs-subrepos
> Changing value of boringfile from '.darcs-boring' to '.darcs-subrepos'

What happens if you record this change before doing the darcs whatsnew?

Thanks,
msg5996 (view) Author: claus.reinke Date: 2008-09-12.18:10:41
> $ darcs setpref boringfile .darcs-subrepos
> Changing value of boringfile from '.darcs-boring' to '.darcs-subrepos'

|What happens if you record this change before doing the darcs whatsnew?

I have no intention of recording local preferences.
Claus
msg5998 (view) Author: kowey Date: 2008-09-12.21:31:12
Any help in reproducing and debugging this, would help us get to this          
                                        
resolved.  I was hoping you could record this change, see its effect,          
                                        
and then unrecord in order not to pollute your patch history.                  
                                        
                                                                               
                                        
But if you are not willing to do so, then I will need a volunteer to           
                                        
reproduce this, and also determine if recording the setpref has any            
                                        
effect.  I doubt the filename is what is causing the problem.  The             
                                        
presence of a patch in pending also seems like an unlikely cause, but          
                                        
is somewhat more plausible.
msg5999 (view) Author: claus.reinke Date: 2008-09-12.23:14:23
>I was hoping you could record this change, see its effect,          
>and then unrecord in order not to pollute your patch history.                  

What I meant was that I don't even want to set the preferences,
let alone record that change. That is a temporary local boringfile,
and I was really looking for something like

    darcs whatsnew -l --boringfile=use_this_temporarily

But, yes, if I record the setpref (without recording the other changes
to working, without even darcs adding the temporary boringfile), then it works:

Shall I record this change? (10/11)  [ynWsfvpxdaqjk], or ? for help:
changepref boringfile
.darcs-boring
.darcs-subrepos
Shall I record this change? (11/11)  [ynWvpxdaqjk], or ? for help:
What is the patch name? test boringfile
Do you want to add a long comment? [yn]
Finished recording patch 'test boringfile'

cr3@cr3-lt /cygdrive/d/fptools/ghc
$ cat _darcs/patches/pending
{
}

$ time darcs wh -l -v --debug | head
Beginning identifying repository .
Done identifying repository .
Identified darcs-1 repo: d:/fptools/ghc
Looking for unrecorded changes...
Found unrecorded changes.
Looking for unrecorded changes...
Found unrecorded changes.
diffing dir...
diffing dir...
M ./darcs-all -2 +68
a ./compiler/cmm/CmmLex.hs
a ./compiler/cmm/CmmParse.hs
a ./compiler/dist-stage1/
a ./compiler/dist-stage1/build/
a ./compiler/dist-stage1/build/AsmCodeGen.hi
a ./compiler/dist-stage1/build/AsmCodeGen.o
a ./compiler/dist-stage1/build/Bag.hi

real    1m14.286s
user    0m0.362s
sys     0m0.183s
msg6042 (view) Author: kowey Date: 2008-09-18.08:53:30
I'd be curious to see if David's issue709 fix has any impact on this.  

I'm assigning this to you in hope that you can repeat this test with darcs
2.0.3pre1.  Hopefully you would not need to record the changepref any more.
msg8524 (view) Author: kowey Date: 2009-08-27.01:29:16
So there are two issues reported here.  Normally I'd peel them apart, but I
think here I'll just address an easy one first and be done with it:

1. Temporary setpref: to get a temporary setpref, just darcs setpref and then
darcs revert when done using that.  It's not quite the --boringfile flag
requested, but I think it's something that's going to be used rarely enough that
this is an acceptable solution

2. Apparent whatsnew -l slowness caused by a pending changepref patch (I bet
that if Claus had just backed up and overwritten _darcs/prefs/prefs by hand, he
would have had the same performance effect as copying .darcs-subrepos over to
.darcs-boring).

We need somebody to reproduce this problem.  It looks like you just need to get
a copy of the GHC repo and maybe build GHC
History
Date User Action Args
2008-09-12 15:39:41claus.reinkecreate
2008-09-12 16:37:24koweysetstatus: unread -> unknown
nosy: kowey, dagit, claus.reinke
messages: + msg5995
2008-09-12 18:10:44claus.reinkesetnosy: kowey, dagit, claus.reinke
messages: + msg5996
2008-09-12 21:31:14koweysetpriority: bug
status: unknown -> needs-reproduction
messages: + msg5998
nosy: kowey, dagit, claus.reinke
2008-09-12 23:14:26claus.reinkesetnosy: kowey, dagit, claus.reinke
messages: + msg5999
2008-09-17 08:55:48koweysettopic: + Performance, ThePendingPatch
nosy: kowey, dagit, claus.reinke
2008-09-18 08:53:32koweysetstatus: needs-reproduction -> testing
nosy: kowey, dagit, claus.reinke
messages: + msg6042
assignedto: claus.reinke
2008-10-07 14:55:28droundysetstatus: testing -> waiting-for
nosy: + dmitry.kurochkin, simon, thorkilnaur
2009-08-10 23:45:28adminsetnosy: - dagit
2009-08-25 17:30:35adminsetnosy: + darcs-devel, - simon
2009-08-27 01:29:20koweysetstatus: waiting-for -> needs-reproduction
nosy: kowey, darcs-devel, thorkilnaur, claus.reinke, dmitry.kurochkin
assignedto: claus.reinke ->
messages: + msg8524
title: darcs 2.0.2: whatsnew -l / boringfile filename matters? -> pending changepref patche affects whatsnew -l performance (2.0.2)
2009-08-27 14:33:53adminsetnosy: kowey, darcs-devel, thorkilnaur, claus.reinke, dmitry.kurochkin
2017-07-30 23:04:57ghsetstatus: needs-reproduction -> given-up