VegaLite.jl icon indicating copy to clipboard operation
VegaLite.jl copied to clipboard

Investigate using Cairo.jl and Rsvg.jl again

Open davidanthoff opened this issue 3 years ago • 0 comments

Back in the distant past we used Cairo.jl and Rsvg.jl to create PNG and PDF files. There were various issues that caused us to move away from that, but it might be worth investigating whether the situation is better now.

I think an excellent first step would simply be to investigate the load time impact this has. At some point that was a (the) major concern, but I think newer versions of Julia might have seen optimizations that might make this worry moot.

I think all we need, actually, is some measurement that compare @time using VegaLite for a version that is the current one, and one where the package has a dependency on Cairo.jl and Rsvg.jl.

If we do add Cairo.jl and Rsvg.jl back as dependencies, we could add the following features:

  1. PNG and PDF export on platforms where we don't have node-canvas binaries
  2. export support for EPS files

Generally an export path that is based on Cairo.jl/Rsvg.jl will be slower than the current node-canvas based export path because we have to create an intermediate SVG in the Cairo.jl/Rsvg.jl case. So in my mind the Cairo.jl/Rsvg.jl option would only be used for scenarios that are not already covered by the current node-canvas setup.

davidanthoff avatar May 02 '21 17:05 davidanthoff