perf(server): eliminate implicit full-collection clones by removing Store::read() in favor of read_with()
This commit is contained in:
1 parent
84ad64156c
commit
1d5e4bd00d
8 files changed
+80
-23
No files matched your search
@@ -0,0 +1,28 @@
|
||||
local buf = vim.fn.bufnr('server/src/search.rs')
|
||||
if buf == -1 then
|
||||
vim.cmd('e server/src/search.rs')
|
||||
buf = vim.api.nvim_get_current_buf()
|
||||
end
|
||||
|
||||
vim.api.nvim_buf_set_lines(buf, 216, 222, false, {
|
||||
' &self,',
|
||||
' entities: &[Entity],',
|
||||
' tasks: &[Task],',
|
||||
' snippets: &[Snippet],',
|
||||
' adrs: &[Adr],'
|
||||
})
|
||||
|
||||
-- We need to change the loop variables inside the task from values to clones if they are passed as slices
|
||||
-- Actually we can just clone the slice data before moving it into spawn_blocking
|
||||
vim.api.nvim_buf_set_lines(buf, 222, 223, false, {
|
||||
' ) -> tokio::task::JoinHandle<tantivy::Result<()>> {',
|
||||
' let entities = entities.to_vec();',
|
||||
' let tasks = tasks.to_vec();',
|
||||
' let snippets = snippets.to_vec();',
|
||||
' let adrs = adrs.to_vec();'
|
||||
})
|
||||
|
||||
vim.cmd('write')
|
||||
require('notify')('Updated search index_batch signature', 'info', { title = 'Antigravity' })
|
||||
return 'ok'
|
||||
|
||||
Reference in new issue
Block a user