Hacker News new | ask | show | jobs
by throw10920 159 days ago
Huh, is there a requirement that they be rasterized at build time? If I had a choice, I'd rather ship the SVGs in the bundle alongside a renderer like ThorVG and render at runtime. The renders could even be cached if the rendering itself was expensive.
1 comments

If you’re including these assets as UI elements, they would be rasterized anyway and copied to a GPU bound buffer for the frame blit. Doing so at compile time increases runtime performance.

You can of course override this behavior and redraw your vector every 8.3 ms if you want, but I promise you that this is not faster. For sparse pyramid-tiled vector images like Google/Apple maps, this is a two step process using the latter method followed by the former.