cantino / mcfly

Fly through your shell history. Great Scott!
MIT License
6.76k stars 176 forks source link

Asynchronously load database, show UI immediately #300

Open copy opened 1 year ago

copy commented 1 year ago

Even after with the addition of MCFLY_HISTORY_LIMIT, cltr-r still feels pretty unresponsive with a large database, as measured in https://github.com/cantino/mcfly/issues/125#issuecomment-788729489. It could feel much better if the results were loaded asynchronously, similar to how fzf does it.

cantino commented 1 year ago

How large of a database / history do you have?

copy commented 1 year ago

The commands table in my history.db has 470000 rows.

cantino commented 1 year ago

Maybe we need a way to dedup or reduce history instead?

I'm open to ways to improve this. Not sure how async would work, though.