aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/format/packfile/delta_selector.go
Commit message (Collapse)AuthorAgeFilesLines
* packfile: delete index maps from memory when no longer neededJeremy Stribling2017-10-301-0/+6
| | | | This helps keep memory usage stable while calculating deltas.
* config: support a configurable, and turn-off-able, pack.windowJeremy Stribling2017-09-111-12/+35
| | | | | | | | | | | | | | | | | | | | One use of go-git is to transfer git data from a non-standard git repo (not stored in a file system, for example) to a "remote" backed by a standard, local .git repo. In this scenario, delta compression is not needed to reduce transfer time over the "network", because there is no network. The underlying storage layer has already taken care of the data tranfer, and sending the objects to local .git storage doesn't require compression. So this PR gives the user the option to turn off compression when it isn't needed. Of course, this results in a larger, uncompressed local .git repo, but the user can then run git gc or git repack on that repo if they care about the storage costs. Turning the pack window to 0 on reduces total push time of a 36K repo by 50 seconds (out of a pre-PR total of 3m26s).
* packfile: parallelize deltification of objects in groupsMiguel Molina2017-09-071-1/+31
| | | | Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
* packfile: use a modified version of JGit DeltaIndex and DeltaIndexScannerMiguel Molina2017-09-061-3/+3
| | | | Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
* packfile: reuse delta indexes when possibleMiguel Molina2017-09-061-3/+8
| | | | Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
* plumbing: use sliding window in delta calculations, like git CLJeremy Stribling2017-08-281-1/+4
| | | | | | | | | | This sets a default sliding window of 10 for the delta calculation, just like git CL: https://git-scm.com/docs/git-pack-objects#git-pack-objects---windowltngt For a big-ish repo with 35K objects (17K commits), this reduced the time for calling `deltaSelection.walk` during a push from more than 14 minutes to about a minute.
* plumbing: add IsDelta method to ObjectTypeSantiago M. Mola2017-07-271-6/+2
| | | | | ObjectType.IsDelta is a convenience function to match both offset and reference delta types.
* storage: reuse deltas from packfilesSantiago M. Mola2017-07-271-10/+139
| | | | | | | | | | | | | | | | | | | * plumbing: add DeltaObject interface for EncodedObjects that are deltas and hold additional information about them, such as the hash of the base object. * plumbing/storer: add DeltaObjectStorer interface for object storers that can return DeltaObject. Note that calls to EncodedObject will never return instances of DeltaObject. That requires explicit calls to DeltaObject. * storage/filesystem: implement DeltaObjectStorer interface. * plumbing/packfile: packfile encoder now supports reusing deltas that are already computed (e.g. from an existing packfile) if the storage implements DeltaObjectStorer. Reusing deltas boosts performance of packfile generation (e.g. on push).
* format/packfile: fix bug when the delta depth is equals to 50Antonio Jesus Navarro Perez2017-05-081-0/+5
|
* project: move imports from srcd.works to gopkg.inAntonio Jesus Navarro Perez2017-03-071-2/+2
| | | | To be able to fix #261 we will move again to gopkg.in before v4 stable release.
* new srcd.works/go-git.v4 pathMáximo Cuadros2017-01-301-2/+2
|
* packfile: delta selection logic (#182)Antonio Navarro Perez2016-12-161-0/+169
* packfile: delta selection logic - Implemented logic to assign deltas to objects * Requested changes * Improved tests and fix errors