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

Identify 3D models using an integer ID instead of a name #70

Merged
merged 11 commits into from
Jan 2, 2025

Conversation

jonathanhogg
Copy link
Owner

@jonathanhogg jonathanhogg commented Jan 1, 2025

For programs with a very large number of instances, a lot of time is spent collecting the models. A significant amount of this seems to be the cost of building the names for the models and then looking these up in the ModelsCache. It would be quicker to construct numeric IDs rather than string names. This PR implements that using the HASH_ functions from models.pxd.

On one of my examples, which has 60k instances of about 10 different models – including 6 or 7 that are the result of !trim operations – the render time goes from ~35ms per frame to ~28ms.

@jonathanhogg jonathanhogg merged commit 7b8045e into main Jan 2, 2025
18 checks passed
@jonathanhogg jonathanhogg deleted the enh_model_hash_ids branch January 2, 2025 18:35
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.

1 participant