mroderick / plete

Vanilla autocomplete component
https://plete.dev
BSD 3-Clause "New" or "Revised" License
35 stars 4 forks source link

Use initial filtering implementation #65

Closed mroderick closed 4 years ago

mroderick commented 4 years ago

The updated filtering implementation turned out to be very slow.

See https://github.com/mroderick/plete-docs/commit/39487ff5d195c0a24ff4440e69b36deb1f764005#diff-5fc723bfb37888ae916b65c506c6069e

Updated filtering

2020-02-24 at 20 36

Old filtering

2020-02-24 at 20 35

Background (Problem in detail) - optional

In https://github.com/mroderick/plete-docs/commit/e448f4cb9385a05e67244edb64c44dd9bde8b382#diff-5fc723bfb37888ae916b65c506c6069e we "simplified" the countries search, to not use a regular expression.

While it reads a lot simpler, it performs like a brick.

Solution

Revert back to the initial implementation, while a nicer and hopefully also fast implementation is researched.

How to verify

See the timings abovie

Contributor declaration