atuinsh / atuin

✨ Magical shell history

Home Page:https://atuin.sh

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

atuin history gc?

AlJohri opened this issue · comments

I seem to have accidentally re-run atuin import zsh after already using atuin for a period of time. I installed atuin on a new computer and kept syncing and was getting 0 results. I wasn't sure what was going on until I realized that the new installation was using the sync v2. I have since upgraded all installations to use sync v2, however as part of trying to figure out what was going on, I had re-run the atuin import zsh command and then run atuin sync. This appears to have doubled the size of my history from 150k records to 300k records.

Is there anyway I can "garbage collect" down to a list of unique entries and clean up my atuin history?

It seems like its taking almost 0.5 to 1 second when I press CTRL-R (not sure how to check exactly). Would love to figure out some way to trim some of this history down or speed up the TUI so CTRL-R is instantaneous.

As a proxy for timing, it takes about 5 seconds to run atuin history list:

❯ atuin history list | wc -l
366974

❯ time atuin history list &> /dev/null
atuin history list &> /dev/null  4.87s user 2.81s system 172% cpu 4.448 total