Skip to content

Increase go-git cache size #440

@jfontan

Description

@jfontan

Right now there is no way of changing the default cache size in go-git and its size too small (96 MiB). I've been doing tests changing this value and its performance improved a lot.

Repositories: linux (2013), numpy, tensorflow
Number of rows: 395709
Query: SELECT count(*) FROM commits c NATURAL JOIN ref_commits r WHERE r.ref_name = 'HEAD';

Default cache: 1 row in set (54 min 22.17 sec)
Cache size * 8: 1 row in set (20 min 43.69 sec)

Memory consumption is also not too big. gitbase used 1.3 GiB in this query.

We should add an option to go-git Open to select cache size.

Metadata

Metadata

Assignees

Labels

performancePerformance improvementsproposalproposal for new additions or changes

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions