Commit Briefs
CHANGES for got 0.123 (tags/0.123)
cache fewer but larger deltas and fulltexts in delta cache
This increases delta cache hit rate during got-index-pack from 60% to 90% when indexing a full pack of the ports.git repository. In my test case the time taken to index the pack file is reduced from 90 seconds to 30 seconds. Memory usage decreases since we keep fewer deltas in cache now. ok op@
avoid doing asprintf/free per tree entry in got_pack_load_tree_entries()
Allocate one path buffer and keep growing it as needed. For directories we still need to copy the path. But blobs can use the path buffer directly. ok op@
store first-level object_idset hash table entries inline
This trades one malloc/free per hash table insertion for a memcpy. Only hash collisions still require malloc/free when added to the ID set. Also tweak the hash table growth threshold to avoid the table from filling up completely before we grow it further. ok op@
fix a double-free on error in got_pack_paint_commits()
Before heading out on error, clear the qid pointer if we have not yet removed qid from the list. Otherwise the error path will free the qid while it is still on the list. Also garbage collect the qid0 pointer which has been unused for some time. ok op@
stop using the pack delta cache in got-read-pack
In got-read-pack the delta cache slows us down while enumerating objects during "gotadmin pack". Presumably due to the random access patterns[*], the delta cache is ineffective, with a cache hit rate of 4% or less. My attempts to improve this have failed. Until someone can figure out a way to make the delta cache useful for got-read-pack, let's disable it. The equivalent in gotd, repo_read.c, is not using the pack delta cache either. [*]The delta cache is very effective in got-index-pack where we run through deltas stored in the pack file sequentially.
fix a crash trying to cache delta fulltexts on a pack with no delta cache
This crash won't trigger at present but I have an upcoming change for got-read-pack which would trigger it.
got-notify-http: drop tmppath
trade tmppath for wpath+cpath but unveil(/tmp, rwc) and unveil(ca_root, r); ok stsp@
small got.1 fixes
- Replace non-existing macro .Xs with .Sx - Remove a trailing whitespace - Add newline. Otherwise, the sentence is displayed wrong in the web version. It's not visible via man(1) but still a bug.
fix double-slash in gotwebd login URL introduced in previous commit
The configuration file parser ensures that repos_path will be an absolute path. We don't need to manually add another path separator here.
ensure visitors see the repository index page after logging into gotwebd
If a repository URL path is set, include it in the login token URL. This should result in less surprising behaviour when a website is served from the root path "/" and does not require authentication, while autbentication is required to browse repositories at a different path. The gotwebd index page clearly indicates the user is now logged in, while the web site has static content which cannot indicate login status. This new behaviour might be imperfect in cases where a website requires authentication and the visitor is logging in to see it. But that is likely a fringe use case, and it should be easy to navigate back to the desired website after logging into gotwebd.
make gotsys-write-conf configure clone-urls for all accessible repositories
Previously, clone URLs would only be written for repositories explicitly mentioned in the web server configuration section. Set clone-URLs for other repositories, too, provided they can be cloned by the anonymous user (really the login-hint user, which is usually "anonymous" or similar). Add test coverage.
CHANGES for 0.122 (tags/0.122)
