Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related #475 (cc @Byron)
This PR adds an index intended to improve the query for interactive search
I was able to artificially create bad startup times for
atuin search --interactive
by adding several thousand entries to my history with the same command. This stresses themax(timestamp)
for a given command because there is no index to relate timestamps to their respective commands. With this I was able to reproduce an over 2 second startup time which became well under 1 second after this changeOpening as a draft because I want to see if this impact is noticeable for more organic histories. You can test by manually creating this index on your
history.db
NOTE: for local testing your system installed
atuin
will get angry if extra migrations are applied that it doesn't recognize. You can still manually add the index usingsqlite3
and it won't notice, but runningatuin
built from this PR while still having an older version installed still can give