-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pathological view teardown performance #12016
Comments
1.1million times o.O that's on a scale I'm not used to hearing. |
worst case, we can special case teardown. But this legacy stuff may be causing grief in other areas as well. |
Did some digging. I don't think these two functions can co-exist, at least in their current state: ember.js/packages/ember-views/lib/mixins/view_context_support.js Lines 98 to 104 in 4630cfa
For the repro repo, if you get rid of _notifyControllerChange, you don't have million function calls. Trying to figure out if we can just axe one of them. |
I think if you can't axe this, the answer is wrapping this method in an |
@runspired yea I've separately tried having each function check to make sure the other doesn't exist, haven't found anything that still passes this test:
The first 4 assertions are fine, it's the last 4 that don't pass. Yo @tomdale, git blame implicates you on both the code and the tests, got any ideas? |
@runspired @asakusuma For my app, I was having an issue with the I removed the _legacyControllerDidChange: _emberMetalMixin.observer('controller', function () { }), |
@ryanlitalien if you can figure out a way to fix the issue and have the tests still pass, that would be awesome. I tried the change you mentioned 3 weeks ago and it broke tests. |
#12414 fixed the issue reported here |
I started investigating this last night but haven't had a chance to finish, so I'm posting the issue in case anybody else sees this or wants to dig in.
@chadhietala created a repo that reproduces this issue. When you toggle between the routes, you'll see a massive delay.
The problem is somewhere in the legacy childViews support. The "controller:before" and "controller:after" actions are firing over 1.1 million times each during the render.
The text was updated successfully, but these errors were encountered: