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

Bugfix/object removal performance #218

Closed
wants to merge 5 commits into from

Conversation

skwerner
Copy link
Collaborator

This is a performance improvement that brings scenes that were previously unusuably slow to reasonable performance. In cases of hundreds of thousands of instances, exiting hdBlackbird would previously take 30min or longer, now it's down to about one minute.

This is not intended as a replacement for #161 but rather a quick fix until that one is ready.

skwerner added 5 commits May 25, 2021 15:15
std::vector::remove is slow in large arrays, simply swapping with the
last item and resizing is faster.
Previously, it was done using nested loops over HdBlackbird's instances
and coreBlackbird's object array. Now it's two sequential loops.

Especially in the case of millions of instances, this makes exiting
a render much faster.
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