Faster autocomplete list showing
WIP
Zadeh supports adding all the files to its cache using ArrayFilterer instead of calling filter every time. If we use ArrayFilterer searching will be faster
https://github.com/atom-community/zadeh#arrayfilterer
I'm also inclined to add the things like prefix (which is used as relativeToPath here) or extention filtering to Zadeh.
Benchmarks to test:
Repo DefinitelyTyped
-
Calling
filterdirectly each time takes 25ms (typeimport "something") https://github.com/atom-community/autocomplete-paths/blob/1d6979f65db931430e2f077f119e5c8505db5f79/lib/paths-provider.js#L138 -
Filtering extensions takes 7.5ms (type
import "something") https://github.com/atom-community/autocomplete-paths/blob/1d6979f65db931430e2f077f119e5c8505db5f79/lib/paths-provider.js#L132-L135 -
Filtering relativeToPath takes 7.7ms (type
import "./") https://github.com/atom-community/autocomplete-paths/blob/1d6979f65db931430e2f077f119e5c8505db5f79/lib/paths-cache.js#L64
Other benchmarks:
Top to bottom

Bottom to top



