UndertaleModTool icon indicating copy to clipboard operation
UndertaleModTool copied to clipboard

Speed up QOI decompression

Open suphamster opened this issue 3 years ago • 5 comments

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

suphamster avatar Jul 27 '22 13:07 suphamster

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.

Archie-osu avatar Jul 27 '22 14:07 Archie-osu

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...

suphamster avatar Jul 27 '22 14:07 suphamster

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.

Archie-osu avatar Jul 27 '22 14:07 Archie-osu

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.

Miepee avatar Jul 27 '22 15:07 Miepee

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...

suphamster avatar Jul 27 '22 15:07 suphamster