Hey, sorry we didnt notice that the codepen was set with GSAP 1, please find attached below the updated codepen using GSAP v3 https://codepen.io/darondel-yoobic/pen/jOeNrBm. Thanks for your recommandation about using the gsap.context method. We had been able to update our codebase to be working alongside the gsap.context but unfortunately this didnt fix our issue. When setting up the pattern we made sure that whenever the revert method from gsap context was called that all draggable instances was cleared, that was the case, however we still get a high CPU usage after calling the revert from the context.
As for the previous codepen, you can simulate the issue by checking the codepen from an IOS device and then using the safari inspector, just go to Timeline > CPU and record ( red square on the top left corner ), you will notice that the CPU usage is already high on the first load of the component ( without any interaction with the element). And then just click the "close sprite" button below to simulate the revert and observe the CPU usage, you will notice that the CPU usage is still high pretty much like nothing had been discharged by the CPU after the revert, even though we checked that the draggable instance was destroyed on the post revert.
Also, please find attached below 3 screenshot:
1. A screenshot from the video record of the CPU usage while loading the codepen from a safari on IOS
2. A screenshot from the video record of the CPU usage while loading the codepen from a safari on Web
3. A screenshot of the js/event logs processed after a revert from the context ( where the supposed the draggable instance should be cleared ).
So as you can see, this might have an issue with discharging the CPU from IOS ( whereas this is working fine on Web, Android and Chrome ).
We've tried to kill draggable instance manually and via the context and this lead to the same result.
Any more idea to help us out ? or would you consider this to be an issue on your side ?
Many thanks.