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

MAYA-107839 [GitHub 800] USD: exporting the attached maya file using … #2158

Merged
merged 3 commits into from
Mar 8, 2022

Conversation

boudrey
Copy link
Contributor

@boudrey boudrey commented Mar 3, 2022

…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

…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);
Copy link
Contributor Author

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,

Copy link
Collaborator

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().

@boudrey boudrey requested a review from ppt-adsk March 4, 2022 12:04
@boudrey boudrey added the ready-for-merge Development process is finished, PR is ready for merge label Mar 7, 2022
@boudrey boudrey removed the ready-for-merge Development process is finished, PR is ready for merge label Mar 7, 2022
@boudrey boudrey added the ready-for-merge Development process is finished, PR is ready for merge label Mar 8, 2022
@ppt-adsk ppt-adsk added the core Related to core library label Mar 8, 2022
@ppt-adsk ppt-adsk merged commit a183f2b into dev Mar 8, 2022
@ppt-adsk ppt-adsk deleted the boudrey/MAYA-107839/speedup-export branch March 8, 2022 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Related to core library ready-for-merge Development process is finished, PR is ready for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants