fix(picker): cache apropos result to speed up :Telescope man_pages#3399
fix(picker): cache apropos result to speed up :Telescope man_pages#3399delphinus wants to merge 1 commit into
Conversation
fb11712 to
1d9a70e
Compare
|
I dont see a reason for caching ... 1s is not that slow. This just adds overhead for one specific picker |
|
∆When I tested clean-installed Ubuntu, this takes <10ms and As another suggestion, it is good if a cacheable finder exists in telescope. It may cache results of the same command execution. I think it is useful when users expect the same results from |
|
@delphinus sorry for neglecting this PR. I agree that a generic cache would be worth it, but that is blocked by the long-overdue architecture review. The man page finder is also particularly slow, so special-casing this may make sense in the short term. Could you please
|
1d9a70e to
55916a7
Compare
|
I created a suceeded PR: #3616. So close this. |
Description
:Telescope man_pagesuses output from the command:apropos. This is too slow command to use for this.This patch caches the output and reuse it until it becomes stale. Now it detects it is “stale” if the cache file mtime is older than 86400s before.
Type of change
How Has This Been Tested?
I confirmed it works on macOS and Linux. But I didn't write unit tests.
:Telescope man_pagesopens fast because of cache:Telescope man_pagesopens slowly againConfiguration:
NVIM v0.11.0-dev-4649+g6719276040-HomebrewChecklist: