Jump to content
Search Community

Timeline freeze page on load for 5 seconds

Kristjan test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Hello

 

I have debugged the problem to occour when I add TimelineLite. On page load the whole page stutters for five seconds, time is consistent on every load. While its stuttering no other items are loading in and even page scroll is stuck. Total freeze. When stutter ends the timeline animation starts. What can cause suck stutter?

gsap version 2.1.2, jquery version 3.3.1

Link to comment
Share on other sites

Very hard to tell without seeing this. Only under the rarest of circumstances where perhaps 10s of thousands of tweens are initiating at once would I suspect even a few milliseconds of interruption. 5 seconds is an incredibly long amount of time and I can't imagine how loading TimelineLite would cause that type of impact. I'm curious where you are loading TimelineLite from and why you are choosing to load it separately instead of just loading TweenMax.

 

Are you loading GSAP files from a cdn or your own server?

 

Again, without a demo or link to your site its impossible to know for sure and it will take way too long to try to guess.

 

 

  • Like 2
Link to comment
Share on other sites

Thanks for the link. Very helpful.

The issue is not at all related to the fact that you are loading TimelineLite on a page. 

The problem has to do with the fact that you are animating 4734 lines in an SVG and DrawSVG has to measure every single line and manipulate its stroke-dashoffset.

 

I suspect the added time has more to do with the browser's reading and writing of values and not so much DrawSVG's computational time. 

Regardless, I would suggest you try a test with a much simpler svg just to make sure this is exactly where the problem is. 

 

  • Like 4
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...