News for hackers. Stuff that matters.
Re:Nnn – a terminal file manager for programmers by jstimpfle on Saturday November 24, 2018 @10:04AM (#18522290)
Maybe you shouldn't store the file path but just the name, and a parent pointer. That brings you down to 8 bytes size + Parent pointer + a short string. Regarding the string you can go for offsets into a string pool (memory chunk containing zero terminated strings).

So I think 50 bytes per file is easy to accomplish if (name/parent/path) + size is all you want to cache. For speed-up, I would add another 4 or 8 bytes index to map each directory to its first child.

There are no comments on this comment yet.