This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse
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
..
app DEV: Avoid unnecessary site-settings:main lookups (#15006) 2021-11-18 17:11:59 +01:00
config FIX: ember-cli proxy subfolder fix (#12996) 2021-05-10 10:02:33 -07:00
lib FIX: Ember CLI was always loading the admin payload in dev mode 2021-10-05 08:34:10 -04:00
public/assets/scripts FIX: Don't try to boot the ember app on old browsers (#14423) 2021-09-22 16:54:57 -03:00
tests PERF: Improve JS app boot speed by optimizing customResolve() (#14990) 2021-11-18 16:38:00 +00:00
.ember-cli REFACTOR: Sync up master with changes for Ember-CLI (#11671) 2021-01-12 10:13:21 -05:00
.npmrc DEV: Prevent npm usage (#13945) 2021-08-04 22:04:58 +02:00
ember-cli-build.js DEV: Add caret_position.js to ember-cli build (#14009) 2021-08-11 16:42:04 +01:00
package.json DEV: updates popper to 2.10.2 (#14986) 2021-11-17 13:47:55 +01:00
testem.js DEV: Increase Chrome memory limit (#14918) 2021-11-13 15:32:16 +01:00