12 ms·
There's a library for embedding inline svg icons. You call it with a string name in your html template and get back a string svg. It was originally implemented
by iudqnolq 3y ago
There's a library for embedding inline svg icons. You call it with a string name in your html template and get back a string svg.
It was originally implemented as a single GenServer. When you app started up it'd read the filesystem and create a map of svg name => svg contents in a process. Then each lookup call would send a message to that process and get back the contents.
This has had the flaw of making template rendering single threaded. It's far worse than a file read per lookup