Skip to content

Optimize profiler hot paths, eliminate per-frame GC allocations, fix null-pointer crash, and add runtime tests - #1149

Draft
keveleigh wants to merge 1 commit into
MixedRealityToolkit:mainfrom
keveleigh:diagnostics-perf
Draft

keveleigh wants to merge 1 commit into
MixedRealityToolkit:mainfrom
keveleigh:diagnostics-perf

Conversation

@keveleigh

Copy link
Copy Markdown
Contributor
  Execution Time Memory Allocations Speedup vs. Baseline Time Reduction
Baseline (Before)
Per-frame string interpolations ($"{limitBytes} ({limitMegabytes:0.00})") & ToString("0.00") across all 5 metrics
1.707 µs 5 string allocations/frame (~250–300 strings/sec) 1.0x (baseline) 0% (baseline)
Optimized on Value Change (After)
Zero-GC FormatRamString with reusable buffer + TMP_Text.SetText
0.236 µs 0 B (Zero GC) 7.2x faster 86.2% reduction
Optimized Steady-State (After)
Delta-caching hot path when metrics are unchanged
0.011 µs 0 B (Zero GC) 155.2x faster 99.4% reduction

@keveleigh keveleigh self-assigned this Oct 15, 2026
@keveleigh
keveleigh requested a review from a team as a code owner October 15, 2026 21:08
@keveleigh keveleigh added the Package: Diagnostics The Project diagnostics package is impacted by this issue. label Oct 15, 2026
@keveleigh
keveleigh enabled auto-merge (squash) October 15, 2026 21:08
@keveleigh
keveleigh marked this pull request as draft October 15, 2026 21:52
auto-merge was automatically disabled October 15, 2026 21:52

Pull request was converted to draft

@keveleigh
keveleigh force-pushed the diagnostics-perf branch 2 times, most recently from ce1787c to c912fcf Compare October 16, 2026 19:39

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Branch: main Package: Diagnostics The Project diagnostics package is impacted by this issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant