mirror of https://github.com/zulip/zulip.git
d3e961e179
We only convert the query to lowercase outside the loop for an Nx speedup, where N = number of items. And then we use startsWith instead of indexOf, which means we don't senselessly search entire strings for matches. (We've had startsWith polyfills for a while now.) Unfortunately, unless a string start with the exact casing of the query, we still create an entire lowercase copy of the string for the case insensitive match. For the English use case (and many other languages), we could further optimize this by slicing the string before converting it to lowercase. Unfortunately, you have languages like German with the straße/STRASSE problem. It's not clear to me how we handle them with the current code, but I don't want to break that yet. |
||
---|---|---|
.. | ||
assets | ||
audio | ||
generated | ||
html | ||
images | ||
js | ||
shared | ||
styles | ||
templates | ||
third | ||
.gitignore | ||
favicon.ico |