Skip to content

feat(dashboard): .m serialization, integration tests, Octave compat fixes#41

Merged
HanSur94 merged 3 commits into
mainfrom
feat/dashboard-speed-serialization-and-tests
Mar 19, 2026
Merged

feat(dashboard): .m serialization, integration tests, Octave compat fixes#41
HanSur94 merged 3 commits into
mainfrom
feat/dashboard-speed-serialization-and-tests

Conversation

@HanSur94
Copy link
Copy Markdown
Owner

Summary

Final piece of the dashboard engine speed optimization effort. Earlier commits (dirty-flag, incremental update, viewport culling, deferred rendering, resize hooks, sensor callbacks) are already on main.

  • Replace JSON serialization with .m function filessave() now produces a function-wrapped .m file loadable via feval; legacy JSON load preserved as loadJSON()
  • addWidget() returns widget handle — enables w = d.addWidget(...) pattern used in .m export format
  • Integration testsTestDashboardPerformance.m and TestDashboardMSerializer.m covering the full optimized pipeline
  • Octave compat fix — replace contains() with strfind() in testExportScript

Full optimization summary (all commits across this PR + prior main)

Optimization Impact
Dirty-flag system ~6x fewer refreshes per live tick (30 widgets, 5 active sensors)
FastSenseWidget.update() O(N_viewport) incremental update vs O(N_datapoints) full rebuild
Viewport culling + staggered init Only visible widgets rendered on load
.m serialization Simpler, Octave-friendly, version-controllable dashboards

Test plan

  • Verify TestDashboardMSerializer passes (save/load .m round-trip)
  • Verify TestDashboardPerformance passes (dirty-flag + realize + resize integration)
  • Verify TestDashboardEngine.testSaveAndLoad passes with .m extension
  • Verify existing TestDashboardSerializer/TestDashboardSerializerRoundTrip still pass via saveJSON/loadJSON
  • Verify no contains() in any new/modified test files

🤖 Generated with Claude Code

HanSur94 and others added 3 commits March 19, 2026 20:42
DashboardSerializer.save() now produces a MATLAB function file instead of
JSON, enabling feval-based round-trip load. addWidget() returns the widget
handle. Legacy JSON support preserved as saveJSON()/loadJSON().

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… Octave compat

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'FastSense Performance'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.10.

Benchmark suite Current: da5e7a3 Previous: 7db8fd1 Ratio
Instantiation mean std(1M) 2.099 ms 0.607 ms 3.46
Render mean std(1M) 3.315 ms 1.797 ms 1.84
Downsample mean std(5M) 0.274 ms 0.046 ms 5.96
Instantiation mean std(5M) 0.535 ms 0.173 ms 3.09
Downsample mean std10M) 1.186 ms 0.089 ms 13.33
Downsample mean ( std00M) 3.209 ms 1.477 ms 2.17
Instantiation mean ( std00M) 191.825 ms 172.08 ms 1.11
Downsample mean ( std00M) 13.138 ms 1.477 ms 8.90
Instantiation mean ( std00M) 1464.812 ms 172.08 ms 8.51
Render mean ( std00M) 50.532 ms 2.069 ms 24.42
Zoom cycle mean (500M) 20.274 ms 16.132 ms 1.26
Zoom cycle mean ( std00M) 12.582 ms 1.295 ms 9.72

This comment was automatically generated by workflow using github-action-benchmark.

CC: @HanSur94

@HanSur94 HanSur94 merged commit bf25915 into main Mar 19, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant