-
Notifications
You must be signed in to change notification settings - Fork 21
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
double render #176
Comments
I believe the problem is that setting the properties in a computed property triggers the double render. Don't really want to make this a PR yet, because I don't really like the current solution. I especially don't like the necessity of the runloop part. Without it nested create-class-computed calls don't get updated correctly. This is because the ordering of observers is not well defined. I also think it might be possible to remove some observers if we only 'cache' non string values. But this might be difficult if composing the resulting string might give some high level array lookup. |
Seems like this is probably highly related to my issue #159. I have a reproduction linked there if that helps your investigation. |
Thanks, I'll certainly look into your test case. |
@jlami That would be highly appreciated, I have also run into this issue and took a stab at fixing it, but couldn't get anywhere. |
Should be fixed by #188, please confirm. |
It looks like the current solution to detect double renders does not work in newer ember versions. A lot of your travis builds are failing. I'm hoping this has something todo with the double render assertions I'm getting a lot of in my applications.
I've currently disabled them with ember features (EMBER_GLIMMER_DETECT_BACKTRACKING_RERENDER set to false), but I think Ember 3 might have stricter behaviour on this. So I was hoping there would be a solution to this problem.
I think
meta.readableLastRendered
is not used anymore by ember? (https://github.com/kellyselden/ember-macro-helpers/blob/master/addon/create-class-computed.js#L71)The best I could find was https://github.com/emberjs/ember.js/blob/master/packages/ember-metal/lib/transaction.js where the assertion is raised and some other meta variable could be used instead of
readableLastRendered
. But I feel like detecting double renders is kind of iffy. Shouldn't this be handled in a better way by ember in general?[edit]
I think the double render is causing troubles even without doing the click in the current test. https://github.com/kellyselden/ember-macro-helpers/blob/master/addon/create-class-computed.js#L153 seems to trigger an invalidation of the 'parent' property when setting up the computed property.
The text was updated successfully, but these errors were encountered: