gartnera / git-restore-mtime

Sets the modified time of files and directories to the commit time from git
0 stars 0 forks source link

Use go-git fork for more optimizations #3

Closed gartnera closed 2 months ago

gartnera commented 2 months ago

Use my micro optimized fork of go-git.

Related to #1

before

image

read and parse tree entry in one shot

image

cpu.speedscope.json

optimize slice allocation by estimating size

image

cpu.speedscope.json

HACK: decoded tree cache

image

cpu.speedscope.json

GOGC=1000

Also reducing garbage collection frequency cuts off ~2 seconds.