Skip to content
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

Ember 2.11 : getting infinite rendering when loading a model with relationships #480

Closed
olivierchatry opened this issue Feb 2, 2017 · 5 comments · Fixed by #524
Closed

Comments

@olivierchatry
Copy link
Contributor

olivierchatry commented Feb 2, 2017

With 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.

olivierchatry added a commit to olivierchatry/emberfire that referenced this issue Feb 2, 2017
@olivierchatry
Copy link
Contributor Author

olivierchatry commented Feb 3, 2017

@jamesdaniels any chance you can publish a new version ? that would be great ( actually I'm sorry to ask, but how much time does google / firebase allows you to spend on emberfire ? I'm a bit disappointed by the release :( I mean, we still have the version number set to 0.0.0 :(.

@jamesdaniels
Copy link
Contributor

@olivierchatry I'm waiting on access to our Jenkins deploy job. I haven't been given access to this yet. In the meantime perhaps @tstirrat could cut a release? Unfortunately both Tim and I have been pressed with releases of upcoming features lately + haven't spent the amount of time we'd like on the project. I'm sorry.

I am setting goals and expectations with my manager regarding time spent on (and objectives with) Emberfire, so hopefully this improves in the future.

@olivierchatry
Copy link
Contributor Author

olivierchatry commented Feb 3, 2017 via email

@jamesdaniels
Copy link
Contributor

2.0.6 has been cut 👍

@olivierchatry
Copy link
Contributor Author

Thanks a bunch !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants