Skip to content

skinWasAltered very slow with many deleted clones #15

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

Open
GarboMuffin opened this issue Apr 10, 2025 · 1 comment
Open

skinWasAltered very slow with many deleted clones #15

GarboMuffin opened this issue Apr 10, 2025 · 1 comment

Comments

@GarboMuffin
Copy link
Member

happens in TurboWarp/extensions#1153 (comment)

_allDrawables just keeps getting longer so skinWasAltered gets slower each time

@GarboMuffin GarboMuffin changed the title skinWasAltered O(n^2) interaction with many deleted clones skinWasAltered very slow with many deleted clones Apr 10, 2025
@fath11
Copy link

fath11 commented Apr 21, 2025

my idea on how to fix this

create a new list for storing empty drawable/skin IDs

when creating a new drawable/skin, check if there is an empty id, if there is one, use that id, if there is none, create a new item

when deleting a drawable/skin, add its id to the list so we know that the id is empty and available to use

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants