Hacker News new | ask | show | jobs
by smartmic 1498 days ago
The example shows many fields which are stored in the JSON for each command. I wonder how the file size will blow up after some time. Also, how are duplicates handled? Looking at all the details which are kept in context of a command, removing duplicate commands seems not to be an option without loosing the rich context.
1 comments

Yeah, based on the issues that might be a fair assumption:

https://github.com/curusarn/resh/issues

more expected issues from relying on a big JSON file:

https://github.com/curusarn/resh/issues/171

Hi, author here. I have almost two years of history on my machine right now. It's 77k history records which takes up 126MB.

The amount of saved context is currently excessive. When I started the project I didn't know exactly what I would need so I included a lot of things that were never used.

I do plan to reduce the history records to about 16 fields which should more than halve the space requirements. I haven't done this yet because I need to safely convert the existing history records people already have to the new reduced version during update which is tricky.

Can you save a version flag and support both until you write the migration logic? That way at least new users benefit