Skip to content

Optimise GLTFParser.createUniqueName#25969

Merged
donmccurdy merged 2 commits intomrdoob:devfrom
benwest:optimise-gltfparser-createuniquename
May 2, 2023
Merged

Optimise GLTFParser.createUniqueName#25969
donmccurdy merged 2 commits intomrdoob:devfrom
benwest:optimise-gltfparser-createuniquename

Conversation

@benwest
Copy link
Contributor

@benwest benwest commented May 1, 2023

When I'm loading a big scene with lots of repeated names in it, it's about 3x faster if I get rid of the loop in GLTFParser.createUniqueName.

(I messed this PR up yesterday, hopefully not this time 🙃)

@benwest benwest marked this pull request as ready for review May 1, 2023 10:07
@donmccurdy donmccurdy self-assigned this May 2, 2023
@donmccurdy
Copy link
Collaborator

Thanks @benwest!

@donmccurdy donmccurdy merged commit e105adb into mrdoob:dev May 2, 2023
@benwest benwest deleted the optimise-gltfparser-createuniquename branch May 2, 2023 20:01
@WestLangley WestLangley added this to the r153 milestone May 2, 2023
@chrisssssy
Copy link

Thanks @benwest, this fix improved my import speed drastically. I had a GLB with about 15000 small meshes. The whole import now takes less than 2 seconds instead of 90 seconds!

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

Successfully merging this pull request may close these issues.

4 participants