betterer
betterer copied to clipboard
Betterer results file could blow up repository size
Colleague @taneliang brought this one up:
So our .betterer.results file is currently 10,300 lines long, and 926kb. Given that:
a. The .betterer.results file will ideally be updated often, with commits slowly pecking away at the problems in it, and
b. Git does not store file diffs, but file snapshots,
That means that every commit that improves something will increase the size of the repository (.git folder) by almost 1MB (decreasing as problems are found, increasing if new rules are added)
We're worried this could become a drain as more developers and commits are made that touch the file.
Not sure of the best way to address this, but a partial solution would be to keep a results file for each rule you have in the configuration - that way a smaller file is changed if a problem is fixed. They could be kept in a .betterer folder or something. Gzipping the file reduces it down to 128kb, but that comes with its own issues.
Haven't thought of any better solutions quite yet...
Do you have Git LFS enabled? That might make some of it better.
My only idea for this would be to make it possible to store the results file remotely. Could ship a little server and store the source of truth for the files remotely, and then ignore the file from the repo. It would be a bit tricky?
Git is very good at compressing files. It is wrong to assume the repo is gonna grow by 1MB With each commit, because especially with a low delta in the diifs the size increase is tiny.