Adds Rust and Python functions for converting Vega and Vega-Lite specs to the Vega scene graph JSON format.
I didn't add CLI entry points as this isn't a standard file format. The main motivation here is to support testing in the development of alternative Vega renderers.
CPU times: user 7.48 s, sys: 1.12 s, total: 8.6 s
Wall time: 6.82 s
Ignoring any serialization overhead, this suggests that, for this example, Vega takes about 60% of the total render time to generate the scenegraph. The other 40% is taken by the Vega SVG renderer and resvg to render the SVG to PNG. If we had a GPU accelerated renderer, we could potentially shrink this 40% significantly, but a large chunk of the runtime is the generation of the scene graph, which a renderer wouldn't improve.
Adds Rust and Python functions for converting Vega and Vega-Lite specs to the Vega scene graph JSON format.
I didn't add CLI entry points as this isn't a standard file format. The main motivation here is to support testing in the development of alternative Vega renderers.
cc @lsh
Here are some interesting timing observations for a simple scatterplot based on https://altair-viz.github.io/gallery/scatter_tooltips.html
The time to compute the scenegraph
The time to render to PNG
Ignoring any serialization overhead, this suggests that, for this example, Vega takes about 60% of the total render time to generate the scenegraph. The other 40% is taken by the Vega SVG renderer and resvg to render the SVG to PNG. If we had a GPU accelerated renderer, we could potentially shrink this 40% significantly, but a large chunk of the runtime is the generation of the scene graph, which a renderer wouldn't improve.