Speed up symbolic svg loading

If the svg doesn't use the symbolic style classes, we can avoid
loading it multiple times.

This brought the time for loading system-run-symbolic at 256@2
from 6.8ms down to 2ms.
This commit is contained in:
Matthias Clasen
2024-04-28 16:55:55 -04:00
parent d9582c123e
commit 9ce4471527
2 changed files with 130 additions and 34 deletions

View File

@@ -201,6 +201,7 @@ check_functions = [
'posix_fallocate',
'sincos',
'sincosf',
'memmem',
]
foreach func : check_functions
@@ -208,6 +209,7 @@ foreach func : check_functions
args: '-D_GNU_SOURCE',
prefix:
'#include <stdlib.h>\n' +
'#include <string.h>\n' +
'#include <unistd.h>\n' +
'#include <sys/mman.h>\n' +
'#include <fcntl.h>\n' +