UnderminersTeam / UndertaleModTool

The most complete tool for modding, decompiling and unpacking Undertale (and other GameMaker games!)
GNU General Public License v3.0
1.12k stars 213 forks source link

Speed up QOI decompression #1066

Open suphamster opened 2 years ago

suphamster commented 2 years ago

Describe the bug

Would be nice if UndertaleModTool would utilize at least 50% of CPU power to speed up data file loading.

Reproducing steps

Open some big (about 1Gb) data.win file with large (about 20Mb each) hi-res textures and wait while it's loads. It stucks at reading TXTR chunk and takes several minutes to process.

Setup Details

using Win10x64, CPU Core i7 8700, 16Gb RAM, M.2 SSD and this version https://github.com/krzys-h/UndertaleModTool/releases/download/bleeding-edge/CLI-windows-latest-isBundled-true.zip

Archie-osu commented 2 years ago

Known issue, was solved by turning off the antivirus. Which one do you use, if any?

The current theory is that the AV's driver monitoring FS writes / reads slows UMT down because of inefficient UMT code.

suphamster commented 2 years ago

Known issue, was solved by turning off the antivirus. Which one do you use, if any?

The current theory is that the AV's driver monitoring FS writes / reads slows UMT down because of inefficient UMT code.

I'm using build-in Windows Defender but I didn't saw any difference in speed when turned it off by your advice...

Archie-osu commented 2 years ago

Oh yeah my bad, I got issues mixed up, the one I was talking about occurs while saving.

As Miepee told me on Discord, it seems the issue is with QOI decompression, as it only utilizes a single thread.

Miepee commented 2 years ago

Also just wanted to quickly chime in; from the other issue it sounded like GUI loads longer than CLI. This shouldnt be the case, as both projects use the same underlying functions.

suphamster commented 2 years ago

Also just wanted to quickly chime in; from the other issue it sounded like GUI loads longer than CLI. This shouldnt be the case, as both projects use the same underlying functions.

Yeah, thanks for clarifying it - it was my first wrong opinion and after some more testing I concluded that it's the same for GUI and CLI...