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

Simplify NavMeshQueries3D::simplify_path_segment #100401

Conversation

kiroxas
Copy link
Contributor

@kiroxas kiroxas commented Dec 14, 2024

Remove the use of intermediate sparse vector, and directly push into result.

No need to reconstruct at the end.

During my tests, this was saving around 2 000 cycles of startup time. The algorithm is the same, so no gain there.

This was discussed in this code review

@kiroxas kiroxas requested a review from a team as a code owner December 14, 2024 12:53
@AThousandShips AThousandShips added this to the 4.x milestone Dec 14, 2024
@kiroxas kiroxas force-pushed the Simplify_NavMeshQueries3D_simplify_path_segment branch from f2ec05f to 1367aec Compare December 14, 2024 12:56
@smix8 smix8 modified the milestones: 4.x, 4.4 Dec 16, 2024
Copy link
Contributor

@smix8 smix8 left a comment

Choose a reason for hiding this comment

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

Tested with a few paths and seem to work fine, thanks.

@kiroxas kiroxas force-pushed the Simplify_NavMeshQueries3D_simplify_path_segment branch from 1367aec to 774e914 Compare December 16, 2024 19:05
@akien-mga akien-mga merged commit 7bccc82 into godotengine:master Dec 17, 2024
20 checks passed
@akien-mga
Copy link
Member

Thanks!

@kiroxas kiroxas deleted the Simplify_NavMeshQueries3D_simplify_path_segment branch December 18, 2024 10:21
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.

5 participants