Giter Club home page Giter Club logo

Comments (2)

jmdobry avatar jmdobry commented on July 30, 2024

@MattAitchison After looking closer angular-data's source, I think I know why you have the pending promises. There are a couple places where $q.defer() is used, which creates a pending promise, but a different existing promise is returned instead, so the empty, useless pending promise gets thrown away. I think in your case the following code:

defer.promise.finally(function () {
  pendingPromisses--;
});

creates a reference to the empty, useless promise so it never gets garbage collected.

I don't think the solution is to modify your code. I think the better way is to refactor angular-data so it only creates a new promise when it's sure it will use that promise, instead of always creating one and sometimes throwing it away for another. Angular-data stills performs well from an API correctness perspective, but this needs to be fixed. I'll make it first on my list when I swing back around to angular-data from reheat.

I know exactly how to fix it, but it will take some work.

from js-data-angular.

mattatcha avatar mattatcha commented on July 30, 2024

Ah okay that makes sense. Thanks for the help!

And its no rush. This isn't a required feature for my app.

from js-data-angular.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.