Avoid unnecessary calls to text layout#34105
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughChangesThis change modifies Sequence Diagram(s)Not applicable; changes are limited to conditional logic and a trace statement addition without altering component interactions. Estimated code review effort: 2 (Low-Medium) Related issues: None specified. Related PRs: None specified. Suggested labels: engraving, text-layout Suggested reviewers: None specified. Poem: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsLinked repositories: Public OSS repositories can only analyze public repositories installed in this organization. No linked repositories were analyzed; skipped Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This layout call only makes sense if the text is being edited. Otherwise, this function gets called every time we set any font property, including during text creation via initElementStyle.
On the Beethoven 9, the total number of calls to text layout went down from 415.000 to approx 50.000. Most of these unnecessary calls run on empty text so they aren't very expensive, but I still get a 5-6% improvement in the total layout time.