Pinegrow Interactions Performance Improvement

Hi,

I have noticed the total interactions library is loaded for the page. I checked the coverage for the library for my site in chrome dev tools. Screenshot below. It says 64% is the code unused on the page. Can you optimize the library file to load only what is used on the site/page?

image

@Pinegrow_Learner I have considered breaking up the library and optionally load parts, but, this opens a door to a bunch of complications.

For example, imagine using a component that uses feature X to a page that doesn’t load the library for X.

The compressed size that is actually transfered is around 50 KB total. Not sure if the complications are worth the benefits.

What do you all think?

1 Like

My personal opinion is that it doesn’t really matter.

It matters if you stack up a lot of such libraries and files, then of course every kb is worth to be optimized. But with GSAP alone you can create stunning websites and don’t need to add a lot of additional “bloat”. So i guess it’s a point of Skill-Level, where someone who will rely on many (probably unnecessary) libraries would benefit of it and others who keep the project small wouldn’t really realize any difference. So hard to decide what’s best :wink:

2 Likes

Yes. It can complicate things. Yes gzipped library is 50KB. I think it’s fine. I just wonder why the Pinegrow library is twice or may be thrice the size of gsap original library.

It includes ScrollTrigger, animation presets, some PG specific gsap plugins and a bunch of PG code for managing the animations.

1 Like