{"thread":{"id":"2423","subject":"Re: Check for differents trees","startedAt":"2005-11-10T06:57:14Z","lastAt":"2005-11-10T06:57:14Z","messageCount":1,"participants":["Marco Costalba"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"11457","messageId":"20051110065714.88318.qmail@web26310.mail.ukl.yahoo.com","threadId":"2423","inReplyTo":null,"subject":"Re: Check for differents trees","fromName":"Marco Costalba","fromEmail":"mcostalba@yahoo.it","sentAt":"2005-11-10T06:57:14Z","receivedAt":"2005-11-10T06:57:14Z","isPatch":false,"sender":{"key":"mcostalba@gmail.com","avatar":null},"body":"Junio C Hamano wrote:\n\n>Marco Costalba <mcostalba@yahoo.it> writes:\n>\n>>   as you said, the speed is almost the same but your way is clearly better.\n>\n>\n>How often do you do this --diff-filter=AD and why?\n>\n>If it is a common enough operation, we could add a specific hack\n>to stop feeding the diff machinery with unwanted kind of changes\n>when diff-filter is set and none of -B/-C/-M are used.  That\n>_might_ speed things up for you.\n>\n\nSorry for late answer but I was off line a few days.\n\nQGit has a tree viewer now. Tree view is updated when user browses through revisions. Loading the\nfile names of a given tree, although only for the open directories, is an expensive operation. So\nqgit checks for different files anytime the user selects a new revision and the tree viewer is\nopen, I use this test to skip tree reloading if trees have the same files.\n\nI have made some speed test on Linux tree with \n       git-diff-tree -r --name-status --diff-filter=AD sha1 sha2\n\nOn my box it takes from 50-100ms for near revisions to almost 2 seconds when you select a new\nrevision very far from current one. Add to this the fact that in distant revs case there is a high\nprobability that the trees are found different, so you need also to reload the tree at the end,\nadding extra time before GUI update.\n\nSo definitely, It will be great to keep tree browsing snappy. I speak for qgit, but I think any\ngit viewer that adds tree browsing feature should benefit from this change.\n\n\n  Marco\n\nP.S: By the way, if I understand correctly, what you propone is a different behavior of\n--diff-filter=AD. Not to filter for AD, but to find first match of AD. Because of this, IMHO\nshould be better to have a --first-match=AD flag or, better idea, to use --max-count option (from\ngit-rev-list) togheter with --diff-filter and have something like:\n\ngit-diff-tree -r --name-status --diff-filter=AD --max-count=1 sha1 sha2\n\n\n\n\n\t\n\t\t\n__________________________________ \nYahoo! Mail - PC Magazine Editors' Choice 2005 \nhttp://mail.yahoo.com\n"}]}