treefetch icon indicating copy to clipboard operation
treefetch copied to clipboard

[REC] Cache the values

Open TheNarratorsFrevor opened this issue 4 years ago • 2 comments

Hello, here's a suggestion

Implement a caching system that caches the more "stable*" values in a file under /tmp, this method reduces file IO from 4-5 to 1, it could improve performance and make room for future expansion

~If you want, i also can implement this feature.~

Here's an example:

#cat /tmp/treecache/

hostname : ethereal
key1 : value1
key2 : value2

And also an argument to delete it:

treefetch -R :

Removes the temp file Treefetch

TheNarratorsFrevor avatar Dec 19 '21 05:12 TheNarratorsFrevor

Sounds interesting! treefetch is already fast enough as it is, mainly due to using a compiled language (Rust) instead of using Shell. But I'm still open to see how this caching system would work. If you can implement it, I'll see if it's worth adding into the program.

angelofallars avatar Dec 19 '21 07:12 angelofallars

Sure, I'll try in a few days :D

TheNarratorsFrevor avatar Dec 19 '21 08:12 TheNarratorsFrevor