alienhard / SublimeAllAutocomplete

Extend Sublime autocompletion to find matches in all open files of the current window
917 stars 110 forks source link

Update all_views_completions.py #72

Closed hypnopump closed 1 year ago

hypnopump commented 3 years ago

saves a list declaration and posterior slice. a bit uglier

alienhard commented 3 years ago

Hi @hypnopump, thanks for your contribution!

Does this change improve performance in a meaningful way?

hypnopump commented 3 years ago

hm not that i was aware of. It was pretty much the same. The thing i saw that could help significantly is in the final construction of suggestion, which uses a set and a list. One could speed that up by using only a set, but unfortunately it wouldn't conserve the order (alphabetical order would be favoured instead)

alienhard commented 3 years ago

ok, maybe I had misunderstood the motivation for your PR... It saves a few statements but in turn makes the code harder to read IMHO. Unless there's an actual performance gain, which appears not to be the case, I'd rather not apply the change.