You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to use https://gist.github.com/tyalie/7e13cfe2ec62d99fa341a07ed12ef7c0 (from #798) and I noticed that searching is sometimes very slow for me (250 ms which is very noticeable when using up-arrow to cycle through history). This happens when query is empty. With an initial query string, even a single letter, it is much faster (30ms).
What happened?
I compared the time for atuin search invocations:
time atuin search --filter-mode global --search-mode prefix --limit 1 --offset 1 --cmd-only 'w'
0.02s user 0.01s system 94% cpu 0.031 total
time atuin search --filter-mode global --search-mode prefix --limit 1 --offset 1 --cmd-only
0.15s user 0.09s system 97% cpu 0.250 total
I tried to debug the SQL query used but I couldn't find any way to log it. I tried running with strace -f atuin search ..., while I didn't see much interesting stuff, the output length (number of system calls) is drastically different, compare:
What did you expect to happen?
I wanted to use https://gist.github.com/tyalie/7e13cfe2ec62d99fa341a07ed12ef7c0 (from #798) and I noticed that searching is sometimes very slow for me (250 ms which is very noticeable when using up-arrow to cycle through history). This happens when query is empty. With an initial query string, even a single letter, it is much faster (30ms).
What happened?
I compared the time for atuin search invocations:
I tried to debug the SQL query used but I couldn't find any way to log it. I tried running with
strace -f atuin search ...
, while I didn't see much interesting stuff, the output length (number of system calls) is drastically different, compare:I would expect to see somewhat similar time as I am only trying to search with
--limit 1
and small offset, so that should be pretty fast.Just for reference,
atuin stats
shows meTotal commands: 240675
.Atuin doctor output
Code of Conduct
The text was updated successfully, but these errors were encountered: