Skip to content

Commit

Permalink
usd: Remove scope descriptions that are too expensive in super-hot pa…
Browse files Browse the repository at this point in the history
…ths.

(Internal change: 1971013)
  • Loading branch information
gitamohr authored and pixar-oss committed May 18, 2019
1 parent a3225e7 commit 0ef3628
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions pxr/usd/lib/usd/crateData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -475,8 +475,10 @@ class Usd_CrateDataImpl
inline bool Has(const SdfAbstractDataSpecId& id,
const TfToken & field,
VtValue *value) const {
TF_DESCRIBE_SCOPE(GetAssetPath().c_str());
TfScopeDescription desc2(field.GetText());
// These are too expensive to do here, but could be uncommented for
// debugging & tracking down corruption.
//TF_DESCRIBE_SCOPE(GetAssetPath().c_str());
//TfScopeDescription desc2(field.GetText());
if (VtValue const *fieldValue = _GetFieldValue(id, field)) {
if (value) {
*value = _DetachValue(*fieldValue);
Expand Down Expand Up @@ -657,7 +659,9 @@ class Usd_CrateDataImpl

inline bool QueryTimeSample(const SdfAbstractDataSpecId& id, double time,
VtValue *value) const {
TF_DESCRIBE_SCOPE(GetAssetPath().c_str());
// This is too expensive to do here, but could be uncommented to help
// debugging or tracking down file corruption.
//TF_DESCRIBE_SCOPE(GetAssetPath().c_str());
if (VtValue const *fieldValue =
_GetFieldValue(id, SdfDataTokens->TimeSamples)) {
if (fieldValue->IsHolding<TimeSamples>()) {
Expand Down

0 comments on commit 0ef3628

Please sign in to comment.