Skip to content
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

Garbage production of the Tweens? #16

Open
Serotonindude opened this issue Mar 6, 2024 · 1 comment
Open

Garbage production of the Tweens? #16

Serotonindude opened this issue Mar 6, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@Serotonindude
Copy link

I was actually exited to get rid of the Godot.Tweens... Until I took a look into GTweenGodotExtensions.Tween...

        InterpolationTweenBehaviour interpolationTweenBehaviour = new InterpolationTweenBehaviour();
        interpolationTweenBehaviour.Add(new GodotVector2Tweener(getter, setter, to, duration, validation));
        return new GTween(interpolationTweenBehaviour);

Immediately three new classes... One of them immediately creates two collections...
That's at least 5 allocations (I didn't dig deeper...)...

Am I overlooking something, or do those Tweens allocate a lot of garbage?
No offence, but I'm trying to keep garbage production to a minimum...

@Guillemsc Guillemsc added the enhancement New feature or request label Apr 6, 2024
@Guillemsc
Copy link
Owner

Hey, thanks for raising this, It's a valid concern.
I'll admit allocations were not my priority while developing this library, usability was.
I guess some work could be done to improve this through some form of pooling, but it's not as trivial as it sounds.

@Guillemsc Guillemsc self-assigned this Apr 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants