atuin
atuin copied to clipboard
slow output from history list or search
When running atuin history list
or atuin search
with a large database, it takes a while for the output to trickle into the stdout (currently a few seconds in my case). It would be better to paginate/stream the output from sqlite to the terminal so you don't get that lag
I'm very happy to find out that sqlx exposes a fetch
method that returns a stream future :raised_hands:. It's gonna take a bit of refactoring to get it to work, but I'm committed :sunglasses:
I just remembered that one of the reasons I was hesitant to do this was that I wouldn't be able to format the output into a table quite so nicely.
But tbh that's really not very important :woman_shrugging:
@conradludgate is it still slow with https://github.com/ellie/atuin/pull/181 applied?
Most likely. The throughput wasn't super greatly improved, but the time for first byte to the terminal is instant compared to a few seconds.
I'll test it though