tabler / tabler-icons

A set of over 5500 free MIT-licensed high-quality SVG icons for you to use in your web projects.
https://tabler.io/icons
MIT License
18.03k stars 899 forks source link

Performance Improvements #899

Open DrFelder opened 10 months ago

DrFelder commented 10 months ago

Using a lot of SVGs in a browser causes major lag and an overall bad performance. In the current configuration, the icons provided by this package are not reused when rendering -- which can lead to issues. A large table using tabler-icons can easily crash a browser tab (or slow it down so significantly that the browser itself asks you if you want to close it).

A common workaround is using background images applied with css classes -- they might not be the easiest to handle -- but they are fast, really fast!

Idea: Switch to a setup where images are generated in the versions/colors they are needed in and used as background images. It should be possible to not change the API of the components while doing so.

Benefit: Huge increase in performance :)