PixarAnimationStudios / OpenUSD

Universal Scene Description
http://www.openusd.org
Other
6.17k stars 1.23k forks source link

Optimize Sdf_PathNode::GetPathToken() by avoiding unnecessary memory allocation #3312

Open petrihakkinen opened 2 months ago

petrihakkinen commented 2 months ago

Description of Change(s)

GetPathToken no longer does a memory allocation when the token already exists. A benchmark that calls SdfPath::GetString repeatedly on a large amount of SdfPaths shows 2.3x improvement on Windows.

Note that the following unit tests fail on Windows with or without the changes:

158 - testWorkThreadLimitsRawTBBMax (Failed) 767 - testUsdviewNavigationKeys (Failed) 783 - testUsdResolverExample (Failed)

Fixes Issue(s)

None.

jesschimein commented 2 months ago

Filed as internal issue #USD-10180

jesschimein commented 2 months ago

/AzurePipelines run

azure-pipelines[bot] commented 2 months ago
Azure Pipelines successfully started running 1 pipeline(s).