-
Notifications
You must be signed in to change notification settings - Fork 959
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade Shifty to 2.14.1 #2128
Upgrade Shifty to 2.14.1 #2128
Conversation
Thanks for the PR!
Very nice! I'll take a look at what changed, I'm interested to see what you changed to get these perf improvements :)
If you want to try out:
We were using the promise returned by the tweenable. GDevelop/Extensions/TweenBehavior/tweenruntimebehavior.js Lines 181 to 197 in 275f699
You can change this file and the change are imported in the editor. You can close the game preview and relaunch it with the play button to verify the fix/changes you made. I think I can do the fixes that are needed but I'm a bit busy now, so will be tomorrow or later. Thanks again for the PR! Looking forward to benefit from all these sweet performance improvements. |
Whoops! Thank you for taking the time to make this excellent writeup. I see exactly what the problem is! This can be easily fixed in GDevelop by changing the places where there is something like: tween(...)
.catch(...)
.then(...)
.catch(...); To just: tween(...)
.then(...)
.catch(...); The reason we're seeing this is that However, I neglected to define
Tons of little things! I wouldn't say that 2.8.0 performed poorly by any measure, but GSAP has long been the best-performing JS animation engine available, and I wanted to meet that level of performance. Shifty 2.14.0 does exactly that and delivers superior memory utilization to boot! 😁 The code is a little hairy as a result, but something I've learned through Shifty is that fully-optimized code can get a little ugly. That degree of micro-optimization is rarely necessary... but an animation library is one of the exception cases, I think. :) |
That was quicker than I thought! Shifty 2.14.1 has been published: https://github.com/jeremyckahn/shifty/releases/tag/v2.14.1 And this PR has been updated to use it! I also cleaned up the Let me know if you need anything else here. It's been a while since I played with GDevelop, it's come really far. Super impressive work! 🙂 |
Thanks for the super quick turnaround! I've checked on all the examples using tweens and it seems to work well indeed! Thanks for updating Shifty and this PR 👍 Happy to see these extra catch gone :)
Thanks 🙌 It's progressing well and getting more contributions so we're on a nice road :)
Yeah code is sometimes getting hard to read because of optimizations. I would love a way (linters, babel mode to compile to "garbage free" mode etc...) to enforce these micro optimizations - I've also done some of them (avoiding allocation/deallocation of objects as much as possible, etc...) in the GDevelop game engine, but it's hard to keep track of them, ensure they are used in PRs and see the impact they have. Anyway, seems that we're all clear to go ahead with this! 👍 |
Hello! This PR upgrades Shifty to 2.14.0. This latest release should be fully backwards-compatible with the 2.8.0 it's replacing. It provides some significant performance improvements!
I'm not sure how to test this change within the app, so let me know if there's anything I should do before the PR can be merged. I just wanted to make sure that GDevelop has the best performance possible! 🙂