Stat.Mod was a time.Time (24 bytes), so an Entry was 56 bytes. The
listings kept for a long history hold up to ~130k entries (keptEntries),
and on the owner's real cache they were the idle heap's 7.7 MB under
dirent.entry. Mod is now unix nanoseconds (int64) with ModTime() for the
three callers that want a time; getattrlistbulk's seconds and
nanoseconds are summed as time.Unix does. An Entry is now 40 bytes.
Run on mote at this head:
- go test ./internal/sessions ./internal/dirent: ok
- GOOS=darwin/linux/windows go vet ./internal/dirent ./internal/sessions:
ok
- gofmt -l: clean
- Broken by hand: a 16-byte pad in Stat makes TestEntrySize red
("an Entry is 56 bytes, want 40").
- Real-account copy (~/r2278/acct), idle heap at 180s: dirent.Stats
7.68 MB -> 4.20 MB (dirent.entry flat 5.68 -> 1.70 MB); Footprint
148 MB.