diff options
| author | TJ DeVries <devries.timothyj@gmail.com> | 2020-09-21 15:39:40 -0400 |
|---|---|---|
| committer | TJ DeVries <devries.timothyj@gmail.com> | 2020-09-21 15:41:38 -0400 |
| commit | 25b78950977d97b81955a08e14451f65630c512c (patch) | |
| tree | 8932d7b76f4d7eeb6a9b0186291fe4b4c2237a54 /lua | |
| parent | 2ca006fc97affe237fbbd9b728f2602cf07455e7 (diff) | |
feat: Disable job recording from plenary.
This should reduce memory usage at least for large jobs. We won't save
all the results into the job. I _think_ this will be half memory usage
for many situations.
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/telescope/finders.lua | 2 | ||||
| -rw-r--r-- | lua/telescope/pickers.lua | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/lua/telescope/finders.lua b/lua/telescope/finders.lua index 9720895..e9f2b98 100644 --- a/lua/telescope/finders.lua +++ b/lua/telescope/finders.lua @@ -132,6 +132,8 @@ function JobFinder:_find(prompt, process_result, process_complete) writer = writer, + enable_recording = false, + on_stdout = on_output, on_stderr = on_output, diff --git a/lua/telescope/pickers.lua b/lua/telescope/pickers.lua index e9c2cab..50bbefe 100644 --- a/lua/telescope/pickers.lua +++ b/lua/telescope/pickers.lua @@ -660,7 +660,8 @@ pickers.entry_manager = function(max_results, set_entry, info) log.debug("Creating entry_manager...") info = info or {} - info.items_looped = 0 + info.looped = 0 + info.inserted = 0 -- state contains list of -- { @@ -683,7 +684,7 @@ pickers.entry_manager = function(max_results, set_entry, info) end for index, item in ipairs(entry_state) do - info.items_looped = info.items_looped + 1 + info.looped = info.looped + 1 if item.score > score then return self:insert(index, { @@ -714,6 +715,7 @@ pickers.entry_manager = function(max_results, set_entry, info) -- and then shift all the corresponding items one place. local next_entry, last_score repeat + info.inserted = info.inserted + 1 next_entry = entry_state[index] set_entry(index, entry.entry) |
