-
Notifications
You must be signed in to change notification settings - Fork 203
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
MAYA-107839 [GitHub 800] USD: exporting the attached maya file using … #2158
Conversation
…USD takes extremely long I was able to cut in half the time to export going from about 10 min. to 5 min with an improved algorithm for shapes below dagpath. The next bottleneck is here with 87% of the time spent: https://github.com/Autodesk/maya-usd/blob/dev/lib/usd/translators/nurbsCurveWriter.cpp#L61
@@ -120,9 +120,21 @@ bool UsdMayaWriteJobContext::IsMergedTransform(const MDagPath& path) const | |||
|
|||
// Any transform with multiple (non-intermediate) shapes below is | |||
// non-mergeable. | |||
unsigned int numberOfShapesDirectlyBelow = 0u; | |||
path.numberOfShapesDirectlyBelow(numberOfShapesDirectlyBelow); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I translated the code of numberOfShapesDirectlyBelow in OpenMaya code and stop if there is more than one shape instead of going through all the shapes to count them since it is not necessary saving 1/2 of the export time,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Yves. Can you add in a comment saying that you expanded out the implementation of MDagPath::numberOfShapesDirectlyBelow() to cut down the time by half. Otherwise, someone will come in and replace your code with numberOfShapesDirectlyBelow().
…USD takes extremely long
I was able to cut in half the time to export going from about 10 min. to 5 min with an improved algorithm for shapes below dagpath.
The next bottleneck is here with 87% of the time spent: https://github.com/Autodesk/maya-usd/blob/dev/lib/usd/translators/nurbsCurveWriter.cpp#L61