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

Fix SceneImportSettings perf issues #71691

Conversation

hcoura
Copy link
Contributor

@hcoura hcoura commented Jan 19, 2023

Scene Importer was generating collider mesh at every tick when Physics options was enabled, this makes it only do it when changing settings related to INTERNAL_IMPORT_CATEGORY_MESH_3D_NODE.

Honestly I am not 100% confident the actual implementation is how something like this would be done in the project but I couldn't find some clear pattern to replicate.

This closes #68301

@hcoura hcoura requested a review from a team as a code owner January 19, 2023 19:39
@clayjohn clayjohn added this to the 4.0 milestone Jan 19, 2023
Copy link
Member

@clayjohn clayjohn left a comment

Choose a reason for hiding this comment

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

I've left a suggestion that I think helps the codestyle/clarity. In terms of content, this change makes sense to me. We definitely do not want to be creating a collider every tick

editor/import/scene_import_settings.cpp Outdated Show resolved Hide resolved
@hcoura hcoura force-pushed the res-importer-gen-physics-mesh-only-when-needed branch from 6f110a1 to c608e79 Compare January 19, 2023 20:04
Copy link
Member

@clayjohn clayjohn left a comment

Choose a reason for hiding this comment

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

Looks fine to me, but I am not expert in the importer, so it would be nice to have a review from someone else more knowledgeable as well.

@hcoura hcoura force-pushed the res-importer-gen-physics-mesh-only-when-needed branch from c608e79 to b95219e Compare January 19, 2023 21:48
@akien-mga akien-mga requested a review from a team January 20, 2023 07:40
@akien-mga akien-mga merged commit 766bb88 into godotengine:master Feb 10, 2023
@akien-mga
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

Import 3d model view lags when physics is ticked in Generate section.
3 participants