[BUG] - Inline Storage of Icons makes mods.yml very big and slows everything down
Describe the bug The last weeks a change for the icon handling was added. Looks like before the icon in mods.yml was refered by a file location from the mod - the new version seems to be to put the icon.png as an inline data into the mods.yml
For big Modpacks, this makes the mods.yml very big and tools which parse it / work with it, much slower than before.
R2Modman seems to be slowed down, too, e.g. when deleting ~100 dependend mods in a profile.
To Reproduce Steps to reproduce the behavior:
- Create a new profile, e.g. for Valheim
- Install the bepinex framework base package
- --> mods.yml geths the "icon:
" entry. - install more mods, e.g. a modpack with ~30 mods
- --> mods.yml gets very big, every icon is put inline, even the bepinex logo which was saved with the filepath in the mods.yml
Why was the new method added? To get rid of filesystem accesses? Even the r2modman package seems to work much slower, if you make changes in the profile.
From my point of few it would be perfect to have a switch to turn of the new behaviour (as the old one seems still be implemented, see "install the first mod"
Why was the new method added? To get rid of filesystem accesses?
Part of the switch to Vite meant that we'd lost access to the Node FS library from the frontend. It doesn't overly matter from that perspective because Electron advised against it anyway and doesn't allow that behaviour if you have webSecurity enabled (which is recommended of course).
The actual content of the path is base64, but that base64 data is loaded by reading it on disk (basically, that field is still used, you just don't see it). It should behave similarly although I can check if it's actually behaving asynchronously if that's what's slowing down the loading of the installed tab.