Skip to content

Faster animation/model loading - #776

Closed
dsesclei wants to merge 2 commits into
themrdemonized:all-in-one-vs2022-wpofrom
dsesclei:faster-animation-loading
Closed

dsesclei wants to merge 2 commits into
themrdemonized:all-in-one-vs2022-wpofrom
dsesclei:faster-animation-loading

Conversation

@dsesclei

Copy link
Copy Markdown

smem_container is kept in sorted order, so building it with N items becomes O(N^2). This splits that array into 1024 buckets so we square a smaller number.

Total animation load time drops from 386ms to 78ms for a Cordon save on an i9-14900K.

If this looks good I'll do a PR for MT as well.

@erepb

erepb commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

this looks halfway to hash map. did you try replacing vector with hashmap?

@dsesclei

Copy link
Copy Markdown
Author

Yeah that's faster thanks (52ms), just switched to xr_unordered_map

@themrdemonized

themrdemonized commented Oct 23, 2026 •

Copy link
Copy Markdown
Owner

Please retarget this change to MT branch only for this reasons:

  1. It already has other changes to underlying shared containers
  2. I'm not sure if a change from continuous vector to a map will not cause any problems. I had issues before where i changed underlying data of LTX processing from vector to set and it lead to some strange behaviour on some PCs.

I'll test it on MT branch later when your new PR lands

Closing this one

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