Git Product home page Git Product logo

Comments (3)

homerjam avatar homerjam commented on July 21, 2024

Hi,

I think you've nailed what the problem is and why it is anim-in-out doesn't suffer the problem so much. Generally I've found performance to be similar except in these instances where there is a significant amount of processing/DOM manipulation happening, unfortunately this is exaggerated on less performant devices.

My workaround for this has been to delay the transition so that it (hopefully) occurs after the DOM has been built etc. Alternatively you can delay the rendering of the heavier elements in your page by using events to trigger them after transitions are finished.

Of course using transform instead of position (left, right, top, bottom) helps. You may like to try the CSS will-change property.

I use the profiles section of dev tools to figure out where and why some frames exceed the 16ms threshold, this might provide some clarity on where to focus your optimisations.

Hope this helps

James

from angular-gsapify-router.

homerjam avatar homerjam commented on July 21, 2024

FWIW I've seen this now occurs in OSX Safari too. I'll investigate when I have a moment, let me know if you managed to resolve somehow. Thanks

from angular-gsapify-router.

homerjam avatar homerjam commented on July 21, 2024

As a partial fix for this I've added an option to delay the transition until a trigger event is fired on the $rootScope.

Add the following to your route configuration (in the data.gsapifyRouter[VIEW_NAME][enter|leave][in|out]:

// add event listener to $rootScope to trigger transition
trigger: 'viewInitialised'

Then in your view controller:

// broadcast event when view has been initialised
// eg. when expensive layout components/directives have done their thing
$rootScope.$broadcast('viewInitialised');

from angular-gsapify-router.

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.