Since the usvg::Tree type is neither Sync nor Send (see https://github.com/RazrFalcon/resvg/issues/544), this re-parses the data each time the SVG is rendered (much faster than the render itself). The main drawback is that now we must retain access to the data somehow: here either by using a &'static [u8] or an Arc<[u8]>.
Follow up on #376 adding async rendering for
Svg
.Since the
usvg::Tree
type is neitherSync
norSend
(see https://github.com/RazrFalcon/resvg/issues/544), this re-parses the data each time the SVG is rendered (much faster than the render itself). The main drawback is that now we must retain access to the data somehow: here either by using a&'static [u8]
or anArc<[u8]>
.