> And since this is linking to that old thread I started in 2019 I really >think the commit message should be exploring and justifying why this > might be slower in all cases, or at least a sufficient number of cases > to flip the default. > > if it's not are we throwing out a generally useful optimization (by > default) due to some edge cases we've found? I'm not sure if it's an edge case. However, if a git repo has this problem, it's "git push" will always be very slow instead of going fast and slow. > E.g. have you tried to follow-up on this comment by Jeff King? > https://lore.kernel.org/git/20190523113031.GA17448@xxxxxxxxxxxxxxxxxxxxx/ Not yet, I'll try it later. > At the time I didn't, because as noted in a follow-up I'd lost my test > case by the time I read that, but it seems you haven't, and have a > current test case. I tried to find a test case in open-source projects, and finally found one. $ git clone https://github.com/JetBrains/intellij-community.git --bare $ cd intellij-community.git $ git repack -adb $ GIT_TRACE=1 git push . master:test1 Then it would get stuck in "git pack-objects" for about 10s. (OS: Windows) After I deleted the bitmap, "git push" took less than 1s. > I think a really good start would be to come up with some benchmarks for > a few common cases, e.g. how do bitmaps do if we have a big repo but few > refs, how about a lot of refs? Does their stale-ness make a difference > or not (per previous discussions) etc. etc. According to my observation, the problem always occur on git repos which have a lot of refs and objects. Also, "git push" takes much time on "find _objects(..) for haves_bitmap". Hope the information above can help find the cause of the problem. Thanks, - Kyle