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
Performance: [v8 regression] Container.destroy()
is very slow on crowded containers
#10345
Comments
Container.destroy()
is very slow on crowed containersContainer.destroy()
is very slow on crowded containers
heya @joergplewe ! can i ask, how does this compare to a regular Pixi v7 Container? thanks! |
Hi @GoodBoyDigital ! I prepared a comparable playground for v7: https://www.pixiplayground.com/#/edit/YVV1kTr_pTz9VZKNOQFpv v7 |
is this comparable to #10377 ? |
I'm new to Pixi, but at least for my application calling |
updated playground to 8.1.0 |
Container.destroy()
is very slow on crowded containersContainer.destroy()
is very slow on crowded containers
Container.destroy()
is very slow on crowded containersContainer.destroy()
is very slow on crowded containers
much faster now :D #10505 |
Current Behavior
Admired developers,
I frequently have to clear crowded containers (>100000 children) and observed that
Container.destroy(true)
can take several seconds.Compared to my v7 code, where
destroy()
wasn't noticable at all (usingParticleContainer
, to be fair).Clearing the container 'by hand' before calling
destroy()
speeds up the process significantly, which makes me think it might be a bug.Expected Behavior
destroy()
shouldn't be slower than clearing aContainer
by hand.As fast as
ParticleContainer
would be great :).Steps to Reproduce
Use playground https://www.pixiplayground.com/#/edit/zFuIcJIth6M6QmC2IAjR9
After 200 frames, the content will be destroyed and starting to reconstruct.
largeContainer.destroy(true);
may halt rendering for a couple of seconds.Setting
MAKE_IT_FAST_AGAIN=true
clearslargeContainer
manually before destruction, bringing up speed again,Environment
pixi.js
version: 8.0.2Possible Solution
There is a workaround by clearing the container upfront
destroy()
:Additional Information
No response
The text was updated successfully, but these errors were encountered: