3 ms·
We have used SVG in past on the web for rendering waveforms but we have replaced them with prerendered PNG images. The reasons are: the performance is abysmal,
by DrJokepu 14y ago
We have used SVG in past on the web for rendering waveforms but we have replaced them with prerendered PNG images. The reasons are: the performance is abysmal, the file size is considerably larger than PNG (even with gzip compression), browser support (including Chrome and Firefox) is weak even when present (crappy antialiasing, crappy scaling etc).
- duopixel 14y agoIf your PNGs were coming out larger than your SVGs you were probably plotting more points and precision than needed at the given resolution. You can greatly reduce filesize just by rounding up some decimals.
- DrJokepu 14y agoYou mean SVGs being larger than PNGs? No, that wasn't the case, we were using integers and in the prerendered PNGs there was a 1:1 mapping between the integers and the pixels in the PNG.
- ChuckMcM 14y agoAll of these things. Except the 'larger' part. If you're SVG is larger then you can successfully do 'node reduction' on it without losing fidelity. There must be a python tool somewhere that will tell you which nodes are less than one pixel apart at different rendering densities.