Optimize fuzzy file finder sorting in Web IDE
Description
In the Web IDE, we have a getter allBlobs which generates a list of all blobs in the repo sorted. This getter is only used by the fuzzy file finder.
There are a lot of resources being waster to keep track of this getter.
- Anytime I add/remove/rename a file we end up resorting all the files. Hopefully Vue isn't overreacting and doing this even if I just update the file
😬
The fuzzy finder is doing linear search anyways https://github.com/jeancroy/fuzz-aldrin-plus/blob/84eac1d73bacbbd11978e6960f4aa89f8396c540/src/filter.coffee#L17, so there's no performance benefit to sorting first. Let's do the fuzzy search first and then sort the results.
Further thoughts
Ideally we could give our fuzzy finder some options on how to score records, such that files opened earlier are scored better.
Edited by Paul Slaughter