discourse/app
David Taylor 135fdd59ed
PERF: Improve JS app boot speed by optimizing customResolve() (#14990)
Time spent in the 'find module with suffix' portion of our `customResolve` function were adding up to around 100ms-150ms when booting the app. This time is spread over 150+ calls, so it's not immediately obvious in flamegraphs.

This commit implements a (reversed) [Trie](https://en.wikipedia.org/wiki/Trie) which enables fast suffix-based lookups on a list of strings.

In my tests, this requires < 5ms to initialize, and brings the cumulative 'find module with suffix' time down to `< 5ms`. This corresponds to a ~100ms improvement in LCP metrics in my browser.

The only behavior change is to remove support for module filenames which are **not** dasherized. I haven't found any core/theme/plugin modules which are not dasherized in their filenames.
2021-11-18 16:38:00 +00:00
..
assets PERF: Improve JS app boot speed by optimizing customResolve() (#14990) 2021-11-18 16:38:00 +00:00
controllers DEV: Extract shared external upload routes into controller helper (#14984) 2021-11-18 09:17:23 +10:00
helpers DEV: Allow actions to change the manifest endpoint (#14522) 2021-10-06 15:41:52 -05:00
jobs FIX: Drop malformed CC addresses in GroupSmtpEmail job (#14934) 2021-11-16 08:15:11 +10:00
mailers FIX: Do not show recipient user in email participants list (#14642) 2021-10-19 15:26:22 +10:00
models FIX: exclude moderator_action post for reply count in user summary. (#14991) 2021-11-18 13:42:03 +05:30
serializers FIX: rename action_code_href to action_code_path (#14834) 2021-11-08 14:32:17 +11:00
services FIX: Cache all watched words (#14992) 2021-11-17 18:59:44 +02:00
views DEV: Don't try to load admin locales in tests (#14917) 2021-11-13 15:31:55 +01:00