-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
USDZ archive lookup is O(n^2) #1577
Comments
Filed as internal issue #USD-6816 |
lkerley
pushed a commit
to imageworks/USD
that referenced
this issue
Jan 7, 2022
…l references. The idea for this change and the initial implementation were contributed by @marsupial in PR PixarAnimationStudios#1578. I did some further simplifications, cleanup to conform to our standard style, and added a C++ unit test to exercise iterator behavior. From the original submission: While linearly traversing the **usdz** archive, cache the path and header information so that subsequent lookups can be accelerated. This brings down load time of a **usdz** file that was taking ~3 minutes to ~16 seconds, and can often wind up performing better than parsing the original **usdc** file that generated the **usdz** (likely because IO is avoided on the references as the files are _in memory_ from the archive). Fixes PixarAnimationStudios#1577 (Internal change: 2205950)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description of Issue
USDZ is linearly traversing the archive for every lookup, which creates a huge bottleneck and is very noticeable once you pass ~10000 entries.
This was noticed by someone who is trying to use USD and Draco compression, which means every mesh will be referencing an external file. While not the most common use-case, the issue will also be at play even in a flat USD scene that makes heavy use of unique textures, or for a heavily referenced scene that just wants to be bundled into one file.
Steps to Reproduce
The text was updated successfully, but these errors were encountered: