Hi,
just discovered that the (sometimes excessive large) golang mod disk cache is - in opposite to the compiler cache - not (yet) properly deduplicated.
Try yourself: Made a little hack/tool to deduplicate data via hardlinks (unix/i-node-filesystems tested only, not windows yet).
If you can reproduce and has it shows no downsides (remove/add should auto-dereference) it should be part of src/cmd/go/internal/mod* pack?
If you can confirm/field test, please report back!
I would love to write a quick stdlib/proposal.
At golang scale, it could make a real resource / enviromental dent!
It least for me, it cut my disk cache in half and reduced vfs fs mem-cache required as well, so should scale even on deduplicated fs like zfs/btrfs. Made my batch builds fast and snappy again!
Try yourself: Made a little hack/tool to deduplicate data via hardlinks (unix/i-node-filesystems tested only, not windows yet).
https://github.com/paepckehh/fsdd
(less than 1kLOC, 100% golang stdlib, no external deps)
If you can reproduce and has it shows no downsides (remove/add should auto-dereference) it should be part of src/cmd/go/internal/mod* pack?If you can confirm/field test, please report back! I would love to write a quick stdlib/proposal.
At golang scale, it could make a real resource / enviromental dent!
It least for me, it cut my disk cache in half and reduced vfs fs mem-cache required as well, so should scale even on deduplicated fs like zfs/btrfs. Made my batch builds fast and snappy again!
Michael (edit:first-post-ever-style-fixes)