Giter VIP home page Giter VIP logo

Comments (3)

kentcdodds avatar kentcdodds commented on May 9, 2024

Here are a few things you might try:

  • use ng-stats to see digest times
  • Try it in an incognito tab (so it doesn't have your extensions). It looks like you have Batarang installed and enabled. Could be that...
  • Open up the devtools and click the "Pause" button to see where execution is.

Pause button:

screen shot 2015-11-30 at 9 45 51 am

Let me know what you come up with :-)

from ama.

ksr583 avatar ksr583 commented on May 9, 2024

I had already been using ng-stats to try and track down the problem with no luck (although it did help me improve other things about the app by reducing watchers via one-way binding. In the end I resorted to process of elimination: removing things from my controller and routing until the problem went away.

In the end it turned out the culprit was angular.copy(). I found this thread where one of the Angular collaborators even said that the team regrets exposing angular.copy to the public, and that led me to removing it from my controller to test – I had about 6-7 of them in the offending controller. Voila, page load time went back to normal (~1s).

I can't remember exactly why I was using angular.copy in that situation, as everything still worked the same after I removed it, but I think it had something to do with sorting/manipulating lists off of an API by making a copy of them first. Anyway, issue resolved!

from ama.

joshmanders avatar joshmanders commented on May 9, 2024

I can't remember exactly why I was using angular.copy in that situation

I remember we talked about why you were using it many months ago, I just can't remember the reason.

from ama.

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.