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
There should be an option to cache the output of the OverseerRun command on file load and when changing buffers. This would make the command much faster and much better to use, especially when mapping it to a shortcut.
Provide background
When running OverseerRun command, it takes a lot of time because it needs to parse the builtin templates and then check the conditions of each template. It would be nice to make this command faster because right now, it takes like 2 seconds to run for me.
What is the significance of this feature?
strongly desired
Additional details
Here is the part of the code where all the work is done
for_, providerinipairs(providers) dolocalprovider_name=provider.namelocalis_match, message=condition_matches(provider.condition, nil, opts, false) -- THIS TAKES SO MUCH TIMEifis_matchthenlocalcache_key=provider.cache_key(opts)
localprovider_cb=function(tmpls)
handle_tmpls(tmpls, provider_name, provider.module, cache_key)
endstart_times[provider.name] =vim.loop.hrtime() -- Undefined field `hrtime`.pending[provider.name] =trueifcache_keyandcached_provider_results[cache_key] thenhandle_tmpls(
cached_provider_results[cache_key],
provider_name,
provider.module,
cache_key,
true
)
elselocalok, tmpls=pcall(provider.generator, opts, provider_cb)
ifoktheniftmplsthen-- if there was a return value, the generator completed synchronously-- TODO deprecate this flowprovider_cb(tmpls)
endelselog:error("Template provider %s: %s", provider.name, tmpls)
endendelsereport.providers[provider_name] = {
is_present=is_match,
message=message,
total_tasks=0,
available_tasks=0,
}
endend
No response
The text was updated successfully, but these errors were encountered:
Did you check existing requests?
Describe the feature
There should be an option to cache the output of the OverseerRun command on file load and when changing buffers. This would make the command much faster and much better to use, especially when mapping it to a shortcut.
Provide background
When running OverseerRun command, it takes a lot of time because it needs to parse the builtin templates and then check the conditions of each template. It would be nice to make this command faster because right now, it takes like 2 seconds to run for me.
What is the significance of this feature?
strongly desired
Additional details
Here is the part of the code where all the work is done
No response
The text was updated successfully, but these errors were encountered: