Skip to content

Why not load SearchIndex from cache on delete/vacuum and Writer BGW? #1619

Answered by neilyio
softhuafei asked this question in Q&A
Discussion options

You must be logged in to vote

@softhuafei, thank you for taking the time to review our codebase! We always appreciate suggestions for performance improvements. While you're correct that there's overhead to loading the index reader/writer from disk, I think in this case the impact is negligible.

Operations that mutate the index are only ever performed from the dedicated background writer process (you can see how it's initialized in lib.rs), and the writer instance is cached in memory after being loaded. The cost of initializing the writer is only paid once.

The design of the background writer process currently only allows a single connection to mutate a writer at a time. We are working to change this to make concurrent…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by philippemnoel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
2 participants