feat: Implement raw=True mode for high-performance figure construction by AlonSpivack · Pull Request #5515 · plotly/plotly.py

@AlonSpivack

Add _as_dict=True parameter to trace constructors and go.Figure for
~4-6x faster figure construction when validation is not needed.

Fast paths added for:
- BasePlotlyType.__new__ / BaseTraceType.__new__
- BaseFigure.__init__, .data, .layout, .add_traces, .update_layout
- BaseFigure._add_annotation_like, ._process_multiple_axis_spanning_shapes

@AlonSpivack AlonSpivack changed the title feat: _as_dict=True mode for high-performance figure construction feat: Implement raw=True mode for high-performance figure construction

Feb 19, 2026

@AlonSpivack

- Implements  in BaseFigure and trace constructors
- Adds global config
- Optimizes , ,
- Adds comprehensive tests in