Issue1090

Title [regression] 'hg diff one/file' stats entire working tree
Priority urgent Status resolved
Superseder Nosy List abuehl, djc, gapon, jglick, mpm
Assigned To mpm Topics performance

Created on 2008-04-16.13:47:23 by jglick, last changed 2008-09-01.12:54:09 by tonfa.

Messages
msg6869 (view) Author: djc Date: 2008-08-29.22:22:14
It's in main, so this is resolved. 1.0.2 was released from the stable branch,
which doesn't have this. I think the next release will be from main/crew.
msg6868 (view) Author: jglick Date: 2008-08-29.17:58:24
Seems this didn't make it into Hg 1.0.2. Unfortunate.
msg6351 (view) Author: jglick Date: 2008-06-18.22:11:55
Thanks! Back to the vicinity of 0.9.5's speed.
msg6347 (view) Author: mpm Date: 2008-06-18.21:41:39
Fixed in 9eb274d773d9
msg5929 (view) Author: mpm Date: 2008-04-18.17:30:13
I'll look into it when I have a minute.
msg5915 (view) Author: jglick Date: 2008-04-16.15:59:56
bisect says:

changeset:   6275:fda369b5779c
user:        Matt Mackall <mpm@selenic.com>
date:        Sat Mar 15 10:02:31 2008 -0500
summary:     diff: use copy smarts from copies.py
msg5912 (view) Author: djc Date: 2008-04-16.14:13:24
It would certainly be nice to have tests for this.

For now, though, it would be more interesting to bisect to see what caused the
regression.
msg5911 (view) Author: jglick Date: 2008-04-16.13:47:19
If you have a large project checked out, and type

$ hg diff some/particular/file

where the named file is modified, Hg 1.0 will take much longer than Hg 0.9.5.
strace (on Ubuntu) shows 1.0 (and crew dev versions) stat'ing the entire working
directory, even though there is no way such information could be relevant.

For a big project, this regression can make basic operations orders of magnitude
slower, especially with cold disk caches.

Surely there is some way to augment unit tests for basic commands to ensure that
they do not inspect irrelevant parts of the working copy?

Demo:

$ hg init
$ for i in 0 1 2 3 4 5 6 7 8 9; do for j in 0 1 2 3 4 5 6 7 8 9; do for k in 0 1
2 3 4 5 6 7 8 9; do mkdir -p $i/$j; echo stuff > $i/$j/$k; done; done; done
$ hg -q ci -A -m new
$ echo more >> 5/6/7
$ strace hg di 5/6/7 2>&1 | fgrep `pwd`
History
Date User Action Args
2008-09-01 12:54:09tonfasetstatus: chatting -> resolved
nosy: mpm, jglick, gapon, djc, abuehl
2008-08-29 22:22:15djcsetnosy: mpm, jglick, gapon, djc, abuehl
messages: + msg6869
2008-08-29 17:58:24jglicksetstatus: resolved -> chatting
nosy: mpm, jglick, gapon, djc, abuehl
messages: + msg6868
2008-06-23 09:01:27djcsetstatus: testing -> resolved
nosy: mpm, jglick, gapon, djc, abuehl
2008-06-20 14:05:35djcsetstatus: chatting -> testing
nosy: mpm, jglick, gapon, djc, abuehl
2008-06-18 22:11:55jglicksetstatus: resolved -> chatting
nosy: mpm, jglick, gapon, djc, abuehl
messages: + msg6351
2008-06-18 21:41:39mpmsetstatus: chatting -> resolved
nosy: mpm, jglick, gapon, djc, abuehl
messages: + msg6347
2008-05-14 10:55:51gaponsetnosy: + gapon
2008-04-18 17:30:14mpmsetassignedto: mpm
messages: + msg5929
nosy: mpm, jglick, djc, abuehl
2008-04-17 07:16:30abuehlsetnosy: + abuehl
2008-04-16 15:59:59jglicksetnosy: + mpm
messages: + msg5915
2008-04-16 14:13:27djcsetstatus: unread -> chatting
nosy: + djc
messages: + msg5912
2008-04-16 13:47:23jglickcreate