Description
Investigate whether the BeWavedDolphin waveform rendering can be made more efficient by replacing SVG-based rendering with direct QPainter drawing. SVG parsing and rendering has overhead that may be unnecessary for simple waveform shapes.
Acceptance Criteria
Implementation Guide
1. Benchmark current performance
- Profile
SignalDelegate::paint() with large waveforms (1000+ time steps)
- Measure SVG load time vs. draw time
- Identify if SVG rendering is actually the bottleneck
2. QPainter implementation
- Replace SVG pixmap rendering in
SignalDelegate with direct QPainter calls
- Rising/falling edges:
drawLine() calls with appropriate coordinates
- High/low levels: horizontal lines at fixed Y positions
- Transition markers: diagonal lines or X-crossings
- Use
QPen styles for signal state (active=green, inactive=gray, unknown=yellow)
3. Caching strategy
- Cache rendered segments for stable signal regions
- Only re-render cells that changed between simulation steps
Key files
App/BeWavedDolphin/SignalDelegate.h/.cpp — waveform cell rendering
App/BeWavedDolphin/SignalModel.h/.cpp — signal data model
App/BeWavedDolphin/WaveformView.h/.cpp — view widget
Description
Investigate whether the BeWavedDolphin waveform rendering can be made more efficient by replacing SVG-based rendering with direct QPainter drawing. SVG parsing and rendering has overhead that may be unnecessary for simple waveform shapes.
Acceptance Criteria
Implementation Guide
1. Benchmark current performance
SignalDelegate::paint()with large waveforms (1000+ time steps)2. QPainter implementation
SignalDelegatewith direct QPainter callsdrawLine()calls with appropriate coordinatesQPenstyles for signal state (active=green, inactive=gray, unknown=yellow)3. Caching strategy
Key files
App/BeWavedDolphin/SignalDelegate.h/.cpp— waveform cell renderingApp/BeWavedDolphin/SignalModel.h/.cpp— signal data modelApp/BeWavedDolphin/WaveformView.h/.cpp— view widget