eclipse.platform.swt icon indicating copy to clipboard operation
eclipse.platform.swt copied to clipboard

Utilize non-Java-library for SVG Rasterization

Open Michael5601 opened this issue 11 months ago • 0 comments

The SVG rasterization for icons introduced in this PR enables the use of arbitrary Java libraries to rasterize SVGs at runtime. Currently, the library JSVG has been selected for this purpose, as it provides the best results compared to other Java libraries such as svgSalamander, Apache Batik, and EchoSVG.

However, there are non-Java libraries that outperform JSVG in terms of performance and functionality. Based on existing comparisons (Wikimedia SVG test suite and resvg GitHub repository), the C-library resvg stands out as the best option.

The choice to use a Java library for the initial implementation was made to simplify integration. Integrating a C library like resvg introduces additional complexity. As can be seen in my JSVG performance evaluation, using JSVG adds approximately 1 second to the initialization time of the Eclipse UI when rasterizing SVGs. One way to improve the performance of the feature is using a faster library like resvg.

This issue stands as a reminder for future work and does not need to be finished to use the feature, as the performance of JSVG is probably sufficient for now.

Michael5601 avatar Jan 24 '25 15:01 Michael5601