Open kuehnelth opened 3 years ago
Hey @kuehnelth, thanks for the report! I think you're ahead of me in usage :)
I just made a branch that adds a new MCFLY_HISTORY_LIMIT
option. Would you be open to checking it out and setting the environment variable to something like 10000 (or whatever) to see how much it speeds up your load time?
Hi, I tested it today. It's a bit faster but not a lot. I enabled the println at the end of build_cache_table.
$ MCFLY_HISTORY_LIMIT= ./target/release/mcfly search
Seconds: 1.336557859
$ MCFLY_HISTORY_LIMIT=10000 ./target/release/mcfly search
Seconds: 0.97758059
$ MCFLY_HISTORY_LIMIT=1 ./target/release/mcfly search
Seconds: 0.785006351
Thanks for testing! I have a better implementation in #126 now. Mind testing again?
Sure. Here are the new results. Now it's quite a bit faster.
# MCFLY_HISTORY_LIMIT= ./target/release/mcfly search
Seconds: 1.06648488
# MCFLY_HISTORY_LIMIT=10000 ./target/release/mcfly search
Seconds: 0.290234198
# MCFLY_HISTORY_LIMIT=1 ./target/release/mcfly search
Seconds: 0.23848428
Great! I've merged the addition of MCFLY_HISTORY_LIMIT
and will do a release soon.
When I press Ctrl-r it takes 2 or so seconds until the search window appears. My mcfly history contains 130000 entries from using it for over 2 years. The file is 40 Megabytes large.
Not sure what the best way to improve this would be. Just deleting all or part of the history is probably the easiest.