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

GLTFLoader: loadNode() dependency request optimization #25079

Merged
merged 1 commit into from
Dec 9, 2022

Conversation

takahirox
Copy link
Collaborator

@takahirox takahirox commented Dec 5, 2022

Related issue: #25058 (comment)

Description

Currently loadNode() first requests the object dependencies for a node, and then it requests skin dependency whey the object dependencies are resolved, and then requests child node dependencies when the skin dependency is resolved. This chain can be long and the response time from the loader can be long. (The problem has been originally mentioned at #15587 (comment))

This PR optimizes the dependency requests in loadNode(). Start all the dependency requests for a node at the beginning of loadNode(). Shorter response time can be expected because of the better use of download parallelism.

Note: This change doesn't have an effect to Three.js scene graph order.

Additional context

Honestly I don't have a test glTF asset. I'd be happy if someone would test and check how much this change can improve the response time.

Start all the dependency requests for a node at the
beginning of loadNode(). Shorter response time can be
expected because of the better use of download
parallelism.
@mrdoob mrdoob requested a review from donmccurdy December 7, 2022 02:26
@mrdoob mrdoob added this to the r148 milestone Dec 7, 2022
Copy link
Collaborator

@donmccurdy donmccurdy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thank you!

@mrdoob mrdoob merged commit e347606 into mrdoob:dev Dec 9, 2022
@takahirox takahirox deleted the GLTFLoaderLoadNodeOptimization branch December 9, 2022 06:00
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.

3 participants