haikuports / haikuporter

The tool that builds HaikuPorts recipes.
MIT License
40 stars 44 forks source link

Investigate using git fast-import for creating the work git repositories #304

Open waddlesplash opened 2 hours ago

waddlesplash commented 2 hours ago

Right now, we extract archives and then just "git add" the results. If we use "git fast-import", though, we could write the uncompressed archive data stream to a pipe and let Git repack it into a repository (git fast-import streams are uncompressed raw data containing all file attributes and whatever else). I did some basic testing, and "git fast-import" is faster even on a ramdisk than "git add && git commit": the former took around 6 seconds while the latter took almost 20. When the files aren't on a ramdisk or are too large to all fit in the disk cache, this would probably be an even bigger improvement.

waddlesplash commented 2 hours ago

(I was testing with Haiku's own git repository in these quick benchmarks.)