On Monday, May 8, 2023 at 3:12:16 PM UTC-4 Tassilo Horn wrote:

I've just played a bit around and came to the conclusion that what makes 
it slow is the path restrictions. That is, when I perform above command 
(without --since) to some reasonably large project with long history and 
some older release tag, it takes about half a second to find 50.000 
commits. When I add "-- <15 paths...>" it takes a second. When instead 
I add 150 paths, it takes 7 seconds. With 350 paths, its 16 seconds. 
Then I tried with more than 2000 which finished in about 4 minutes 

How many paths do you add? Maybe it would be better not to add them 
here at the git log invocation but first figure out the commits and then 
check if they touched a path you are interested in. However, I guess 
that won't work if files got renamed in between.


There are  lot of paths, but I wouldn't have expected that to slow it down. 
Good catch!

I'll just run *git log --no-merges --right-only --cherry-pick --since='2 
months ago' some_tag..origin/master* and then run *git log --since='2 
months ago' origin/master -- path1, path2, ...*using the output of the 
second to filter the output of the first.

Is there something else happening when a path is specified with 
*--cherry-pick*, or can the path checking be moved so this is better 
optimized?

 

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/git-users/cdd56e5a-b7a5-477c-92ae-3e48713ffefdn%40googlegroups.com.

Reply via email to