Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Clone

Read only, no credentials:

https://rodent.software/vole.git

Write over SSH with a registered key:

git clone ssh://git@rodent.software:2222/vole.git

A free and open-source forge that lives in your Git repo.

Read the metadata tree in one git call

5cecc6183eadab8147d11438abc64d54c4b0a78f · Keenan Nemetz · 10d ago · parent 5fce878d

Read the metadata tree in one git call

The issue and change-request loaders read the metadata tree with one
`git cat-file` per file, so a page render cost as many processes as the
branch had issues and comments. On a repository with 30 change requests
the overview paid 114 git invocations and 98 ms; the requests list paid
72 and 90 ms.

Read every listed blob through a single `cat-file --batch`. The push
validators share the same helper, so pre-receive stops paying one
process per file as well.

The metadata branch is the whole source of truth for issues and changes,
so this is the read path that grows with use. Nothing about the format or
the size limits changes: an oversized file is still refused before any of
it is allocated.

metadata/requests.go +3−7

@@ -434,13 +434,9 @@ func ValidateRequests(g *git.Repo, commit string) []string {
434 434 if problems := metadataSizeProblems(paths, shas, g); len(problems) > 0 {
435 435 return problems
436 436 }
437 contents := map[string]string{}
438 for i, path := range paths {
439 data, err := g.BlobBySHA(shas[i])
440 if err != nil {
441 return []string{fmt.Sprintf("cannot read %s: %v", path, err)}
442 }
443 contents[path] = string(data)
437 contents, err := readBlobs(g, paths, shas)
438 if err != nil {
439 return []string{err.Error()}
444 440 }
445 441 if _, err := ParseRequests(contents); err != nil {
446 442 if ve, ok := err.(*ValidationError); ok {