Skip to content
Snippets Groups Projects
Commit 57f18c4ee1df authored by Georges Racinet's avatar Georges Racinet
Browse files

Git: caching read of Git(Lab) default branch

Part of heptapod#351

Suprisingly, reading HEAD with dulwich takes 25ms, and we
were doing that for all branch/topic combination. The penalty
is harsh when running for repositories with hundreds
of branch/topic combinations.

Caching this gets the time to perform a push on PyPy in my dev
setup from 45s to about 4s.

We could have avoided the caching, but there are some other callers,
why spending occasional 25ms when we can avoid it?

This is the occasion to move the setting logic in a separate method,
awaiting the later refactorings for separation of "native" case
from hg_git case.
parent 325467ba9692
No related branches found
No related tags found
No related merge requests found
Checking pipeline status
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment