You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(StateRegistry): improve perf for: .register() and StateMatcher.find() misses
The `.find()` function is pretty hot/frequently used.
When possible, a state is found using a property look up `this._states[name]`
If a state isn't found using an exact match, another attempt is made to do a glob match.
The glob match allows a future state such as `future.state.**` to be matched for any child such as `future.state.child.nested`.
This causes unnecessary overhead especially during bootup and registration.
Before registering a state, we first check to see if it already exists.
This change does three things:
1) Only state names that *might* be a glob are tested
2) The Globs for states with glob-like names are cached
3) Do not use globs in `.register()` when checking for "State foo is already defined"
Related to #27
Related to angular-ui/ui-router#3274
0 commit comments