From: Wolfgang Kritzinger Date: Tue, 21 Jul 2026 03:17:23 GMT Subject: Performance regression in connectivity check during receive-pack (git 2.54) Message-ID: Hi! I'm a developer working on the on-premise version of Bitbucket at Atlassian. We noticed pushes to Bitbucket got much slower after upgrading Git on the server side from 2.50 to 2.54. I traced the slow part to the connectivity check that receive-pack runs: git rev-list --objects --stdin --not --exclude-hidden=receive --all \ --quiet --alternate-refs --progress=Checking connectivity `strace` shows that after a push, 2.54 does a failing open() of of numerous loose objects -- once in the quarantine (incoming) directory and once in the main object store -- before finding it in a pack: openat(".../objects/tmp_objdir-incoming-XXXX/ed/58..", O_RDONLY) = ENOENT openat(".../objects/ed/58..", O_RDONLY) = ENOENT 2.50 does not do this. In most customer deployments of Bitbucket, the Git data lives on an NFS share. The extra latency on NFS makes this process of checking for non-existent loose objects take too long, the push essentially hangs at the "Checking connectivity" step. I believe this new behavior was introduced in the recent object database rework. After using bisect, I belive the problem can be traced back to commit 8384cbcb4c. I don't know the codebase well, but from what I can see is that the order in which objects are looked up in object databases changed. Assuming there are two object databases configured (Main repo, and the quarantine directory, for example), the lookup order used to be: 1. _quarantine dir_ packs 2. _main dir_ packs 3. _quarantine dir_ loose objects 4. _main dir_ loose objects With Git 2.54, the order appears to have changed to: 1. _quarantine dir_ packs 2. _quarantine dir_ loose objects 3. _main dir_ packs 4. _main dir_ loose objects In my testing, within a well-packed repo, Git 2.50 actually never performed a loose object lookup. The current design seems to iterate over the configured object databases and perform a pack and loose object lookup for each. Is there a way to avoid these costly loose object lookups?