Ember 2.11 : getting infinite rendering when loading a model with relationships
See original GitHub issueWith Ember 2.11, when I load a relationships that have more than 10 elements, I get and “infinite rendering invalidation detected”.
This seems to come from adapters/firebase.js:142
_fetch(ref, log) {
this._incrementWaiters();
return new Promise((resolve, reject) => {
ref.once('value', (snapshot) => {
this._decrementWaiters();
Ember.run(null, resolve, snapshot);
}, (err) => {
this._decrementWaiters();
Ember.run(null, reject, err);
});
}, log);
},
replacing by :
_fetch(ref, log) {
this._incrementWaiters();
return new Promise((resolve, reject) => {
ref.once('value', (snapshot) => {
this._decrementWaiters();
Ember.run.scheduleOnce('afterRender', this, resolve, snapshot);
}, (err) => {
this._decrementWaiters();
Ember.run.scheduleOnce('afterRender', this, reject, err);
});
}, log);
},
works. I would guess it happens when we get a lot of update message at the same time, and they are called one after each other instead of being queued, anyway I will submit a pull request and you can see if you want to either fix the problem in firebase client or just fix it using ember.
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Infinite Loop in Ember-Data clearRelationships?
Stepping through the crash, the issue appears to be in clearRelationships, but no matter how minimal I attempt to make the Model relationships...
Read more >Performance problems · Issue #12 · adopted-ember ... - GitHub
We really like ember-light-table but this performance issue is a show-stopper ... In some cases a load time of 20 seconds down to...
Read more >Rendering a hasMany relation progressively - Ember.JS
My first try was to create a Component but I saw is not really a good pattern to load data from a Component...
Read more >@ember-data/model | Yarn - Package Manager
Release 2.1.0 (October 5, 2015) · #3811 Format lists in JSONSerializer docs for rendering · #3814 [BUGFIX] Do not deserialize when a relationship...
Read more >yoember.com: Ember.js Octane Tutorial - From beginner to ...
Free Ember.js tutorial for absolute beginners. ... using components; Lesson 6 - Advance model structures and data relationships ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
2.0.6 has been cut 👍
Thanks a bunch !