zulip/static
Steve Howell 7d7028b7d0 performance: Speed up PM lookaheads.
This looks like simple code cleanup, but it's more
than that.

The code cleanup here is that we don't have three
callbacks to get a list of typeaheads for bootstrap.
Instead, we just have one function that does all the
main work.

And then the speedup comes from the fact we no longer
need to remove diacritics from the query for every
time through our loop of seeing if a person matches
the query.

It's a bit subtle to see in the diff, but these are
the relevant lines:

    const matcher = exports.get_person_or_user_group_matcher(query);
    const filtered_results = _.filter(people_and_groups, matcher);

Before this, bootstrap was doing $.grep, and we'd have
to reinitialize the matcher for every person.

If you profile this before and after, you'll see that
remove_diacritics gets called fewer times.

To profile this, you want to loads lots of users into
your DB and try to autocomplete "Extra", as in "Extra1 User".

If you try to autocomplete something else, then my patch
won't really help, and `remove_diacritics` will still
show up as expensive.  Because it is that expensive a function.
2020-01-03 17:42:29 -08:00
..
assets styles: Finish removing manual antialiasing configuration. 2019-08-30 14:51:52 -07:00
audio notifications: Add a setting for changing the notification sound. 2018-12-09 21:25:30 -08:00
generated
html 5xx.html: Build with webpack. 2019-10-28 15:53:15 -07:00
images integrations: Add Gitea integration. 2019-11-18 11:55:24 -08:00
js performance: Speed up PM lookaheads. 2020-01-03 17:42:29 -08:00
shared js: Automatically convert var to let and const in most files. 2019-11-03 12:42:39 -08:00
styles auth: Merge RemoteUserBackend into external_authentication_methods. 2019-12-10 20:16:21 +01:00
templates refactor: Extract email_for_user_settings. 2019-12-28 11:22:24 -08:00
third minor: Fix accidental global variable leak in marked. 2019-12-09 16:13:02 -08:00
.gitignore generate-custom-icon-webfont: Replace with webpack webfonts-loader. 2019-07-18 12:00:00 -07:00
favicon.ico