File with lots of style tags takes too long to load
Summary:
A big SVG file opens in 92.5 within 13 seconds. In inkscape-1.1-dev_2020-07-24_947f10df-x64 and inkscape-1.1-dev_2020-06-16_05168dc2-x64 it never opens (never waited longer than 3 minutes before killing the process).
Dragging the files into Inkscape and picking the top option (keep editable(?)) freezes Inkscape
Steps to reproduce:
Download, extract and open test.svg from test.7z - It's a 4,223KB file.
What happened?
Doesn't open, CPU usage low, RAM slowly growin
What should have happened?
- It should open faster. Merging all the style tags together brings the open time to about 30 seconds
- Removing all the gradients with Clean Up document brings the open time to about 3 seconds
- Just removing the gradients brings the time down to 30 minutes, so the number of gradients is clearly affecting the loading times too
Alternatively: pop-up "warning, this file has a huge amount of unused gradients/duplicate style tags, loading time will take [estimation - maybe 1s x gradient count?].
Or Inkscape can clean up all unused gradients first or merge duplicate style tags, reducing expected loading time." with [open anyway] [clean up] [Quit]
Sample attachments:
Version Info:
Tested in inkscape-1.1-dev_2020-07-24_947f10df-x64 and inkscape-1.1-dev_2020-06-16_05168dc2-x64.
I will for now use 92.5 to clean up old SVGs I need to access.