-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[c] spAnimationState_apply optimization #1117
Comments
Ay, |
Hi, I have implemented this as temporary fix using 3rd party code from public domain for string hashing (murmur hash), so I'm not sure if it can be merged to your code base. I can update my fix with string hashing which is good for you, and create pull request if you want. |
Murmur should be fine license wise. Happy to merge your PR! |
Did you have a chance to check my PR? #1118 |
I've commented on your PR! Sorry for the delay. Let's continue tracking this in the PR, closing this out. |
…hanges according to suggestions in PR EsotericSoftware#1118.
spine-runtimes/spine-c/spine-c/src/spine/Skin.c
Line 74 in d11ebfe
spAttachment* spSkin_getAttachment (const spSkin* self, int slotIndex, const char* name) which is called for each timeline in spAnimationState_apply consumes most of CPU time during animation state applying, especially for spine files with large amount of images. We have spine file with ~1000 images for pre-rendered animations, some of them used in more than one bone, resulting in ~8K entries in _spSkin. With such file we have very low framerate on older hardware.
Adding hashtable to _spSkin for fast Entry lookup gives us ~40x performance gain on such large spine animations.
The text was updated successfully, but these errors were encountered: