An exporter writes millions of attribute values one at a time and is slow because every change sends notifications. What helps at the Sdf level?
- Exam domain
- Data Exchange15% of the exam
- Difficulty
- Medium
- In this mock
- 8 questions on this domainPractise this domain
Why the exam asks this
Data Exchange (15% of the exam)
Objective in the exam guide: Create conceptual data mapping documents, custom importers, exports, and scripts for interchange of data with OpenUSD.
Custom exports and scripts are named.
Why A is the answer
Wrap the edits in an Sdf.ChangeBlock so notifications are batched
Sdf.ChangeBlock groups many layer edits so change processing happens once, which speeds large scripted writes.
Remember: Use Sdf.ChangeBlock for bulk edits.
How it works
Batching Sdf edits avoids repeated change processing.
In detail
- Batch edits.
- Fewer notifications.
Every option, checked
Knowing why each wrong option fails is how you rule it out on exam day.
A. Wrap the edits in an Sdf.ChangeBlock so notifications are batchedRight
Use Sdf.ChangeBlock for bulk edits.
B. Save the layer after every attributeWrong
Saving per edit is slow.
C. Open a new stage per attributeWrong
Opening stages per value is slower still.
D. Write the values as .usda text with string concatenation, skipping the API entirely for speedWrongMost tempting
Hand-built text skips validation.
Why it tempts: Text generation looks fast but loses safety.
Use case
An illustrative scenario, not a real incident.
Illustrative: a converter writes points for 10,000 meshes inside one ChangeBlock.
See it in different ways
stateDiagram-v2 state "Editing" as s0 state "Batched" as s1 state "Notified once" as s2 [*] --> s0 s0 --> s1: enter ChangeBlock s1 --> s2: exit ChangeBlock s2 --> [*]
How to read this chart
- It starts at "Editing".
- From "Editing", "enter ChangeBlock" moves it to "Batched".
- From "Batched", "exit ChangeBlock" moves it to "Notified once".
- It ends at "Notified once".
flowchart LR S0["Create layer"] --> S1["Enter ChangeBlock"] --> S2["Write specs"] --> S3["Exit"] --> S4["Save"]
How to read this chart
- Read it in order: Create layer, then Enter ChangeBlock, then Write specs, then Exit, then Save.