Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: QAAC on Windows 11 (Read 4388 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

QAAC on Windows 11

After migrating to Windows 11 (thanx Microsoft), I noticed a remarkable slowdown of qaac64.exe compared to Windows 10. I still have both OSs running on identical hardware, except Win10 is installed on a SATA-SSD and Win11 is on a M.2-SSD.
My test converts a bunch of MP3 files to a single M4B file (audio book), using this command line:
Code: [Select]
qaac.exe --cvbr 48 --concat --sort-args --verbose --rate 44100 --normalize -o testQAAC.m4b *.mp3
The results on both OSs (scanning speed normalize / encoding speed):
Win10QAAC x86:1185x / 166x
QAAC x64:1455x / 192x
Win11QAAC x86:1136x / 157x
QAAC x64:945x / 152x
While the performace with the 32-bit binary of qaac is almost the same on Windows 10 and 11, you'll notice a speed increase on Windows 10 with the 64-bit binary and a speed decrease on Windows 11. I don't have iTunes installed on both computers; I use the "makeportable" option with a stub of the icudt62.dll.
qaac 2.82, CoreAudioToolbox 7.10.9.0
Has anyone else noticed this strange behaviour or has an idea where the problem is?


Re: QAAC on Windows 11

Reply #2
I wouldn't mind if it was only 2%, but 25%?
Also tested 32/64 bit FLAC binaries: Almost identical speed on Win10 and Win11 (24H2) with 64-bit-FLAC a lot faster (9,7 vs 7.2 sec with -j1)

Re: QAAC on Windows 11

Reply #3
I just tested your findings using virtual machines. I can confirm your command line was 30% faster on Win10 vs Win11.
For reference I skipped the SoX stuff and used foobar2000 to convert same MP3s to single image MP4 file with 44.1 kHz resampling. This task was 11% faster on Win11.

Edit: I started to think that SoX can't be the slowdown factor so I ran your original command line test again but this time after the MP3s had been converted to WAV. Now Windows 11 was 27% faster than Windows 10. I don't understand how OS can have such a big difference in speed here, but whatever qaac uses for mp3 decoding is horribly slow on Windows 11.



Re: QAAC on Windows 11

Reply #6
@Case:
I tested your findings regarding CoreAudio's mp3 decoder:
Win10QAAC x864823x / 205x
QAAC x646276x / 200x
Win11QAAC x864622x / 200x
QAAC x646088x / 243x
So the normalize scanning is 2-3% slower on Win11, encoding with 32-bit binary also sees this penalty. But encoding with 64-bit binary benefits some 20% on Win11!

NB. It seems that there is a general speed benefit to supply WAVs instead of MP3s to CoreAudio. Since I can't use foobar to do that in my script: Any recommendations for a fast MP3 decoder (with wildcard support)?

@nu774: I read the article you linked to; I'm going to give these reg settings a try, although "drag&drop and pin to task bar" does not sound to have an effect on 32/64 binary performance. But who knows...

[Edit]
Applying the registry settings mentioned (HKLM\SYSTEM\CurrentControlSet\Control\FeatureManagement\Overrides\8\...) I could not see any significant differences...

Re: QAAC on Windows 11

Reply #7
This is weird. I installed the first Windows 11 23H2 as a test and kept the virtual instance offline to prevent any updates from installing. That version indeed didn't suffer from the slowdowns present in 24H2.

This is the first time I feel upset about not having run and recorded benchmark results from various tools between OS updates. I haven't noticed anything getting slower on my own machines.

I didn't give much value to the linked 3DMark complaint as I feel it being a commercial graphics test too many things can affect its results. But this Apple DLL performance difference certainly is remarkable and easy to reliably test.

Re: QAAC on Windows 11

Reply #8
NB. It seems that there is a general speed benefit to supply WAVs instead of MP3s to CoreAudio. Since I can't use foobar to do that in my script: Any recommendations for a fast MP3 decoder (with wildcard support)?

libavcodec(ffmpeg) should be faster, but other open source MP3 decoders are usually slower than CoreAudio.

Re: QAAC on Windows 11

Reply #9
Try Win 11 with core isolation off.  Maybe temporarily disable real time defender scanning and firewall.

Re: QAAC on Windows 11

Reply #10
I can say that all device security settings are disabled in my tests. So is Defender. And Meltdown / Spectre protections are also disabled in all test setups. I actually left Defender enabled for the Win11 23H2 test initially and it still outperformed 24H2.



Re: QAAC on Windows 11

Reply #13
Did some more testing. Having the smartscreen.exe process running is what makes Windows 11 24H2 perform so poorly with this qaac MP3 decoding. Turning off smartscreen in the settings doesn't help, the process needs to be killed.

Re: QAAC on Windows 11

Reply #14
I couldn't reproduce any significant differences here by SmartScreen.
However, I could observe through Process Monitor the following:
When reading MP3 files, a lot of calls to QueryStandardInformationFile() is issued, at least once prior to ReadFile() each time.
QueryStandardInformationFile() should be expensive on Windows, and this might be the cause.
Simply caching the results on qaac side could make a substantial difference.

Re: QAAC on Windows 11

Reply #15
I can second nu774 experience: After "killing" the smartscreen process, the results of CoreAudio's mp3 performance did not change significantly here...

Re: QAAC on Windows 11

Reply #16
Indeed the performance drop issue isn't so simple. Yesterday I could rather reliably improve the encoding speed by around 30% by shutting down some defender service, which looked like being responsible for respawning smartscreen.exe process and then terminating the process. Today I renamed smartscreen.exe to a different name so it can't be loaded to begin with, encoding speed isn't increased.
Only reliable way to have super high qaac mp3 decoding speed on Windows 11 24H2 I have is to run the process when the OS is booted in Safe Mode with Command Prompt. Regular Safe Mode isn't enough.

Re: QAAC on Windows 11

Reply #17
qaac has always been using callback-based I/O when it's available, in order to support Unicode path names of Windows OS.
However, qaac did basically nothing for optimizing I/O itself (such as buffering or caching).
qaac has been just directly passing through I/O request from libraries to OS, which turned out to be suboptimal especially for CoreAudio decoders.
Now I'm rewriting I/O layer for input, and it seems that difference can sometimes be tremendous when I/O is very slow (say, when input file is over the network). Otherwise, it is not so visible.
When it's done I'll publish it as the next release.

Re: QAAC on Windows 11

Reply #18
Thank you so much for your ongoing support of QAAC. Very much appreciated!



Re: QAAC on Windows 11

Reply #21
The new version encodes much faster now on all OSes. Looks like 32-bit reaches old 64-bit speeds and 64-bit is further improved. Though in my test scenario the peak scanning appears to have become a tiny bit slower. I wonder how that is possible.

Re: QAAC on Windows 11

Reply #22
Though in my test scenario the peak scanning appears to have become a tiny bit slower. I wonder how that is possible.
It may be compiler difference. Most usually I've been using Visual Studio 2013 for building qaac and 2.84 is built with it, but 2.83 may not (Sorry, I don't remember).

2.84 binary is using FileTimeToLocalFileTime(), FileTimeToSystemTime(), PeekNamedPipe of kernel32.
2.83 isn't.
This is likely due to difference in C runtime library, which means compiler difference.

Re: QAAC on Windows 11

Reply #23
I can (partly) replicate Case's speed improvements here with QAAC v2.84:
On Windows 10, the speed is on par with v2.82.
QAAC v2.84@Windows 11:
Win11 MP3x861107x/199x2.82: 1136x/157x
x64920x/199x2.82: 1455x/192x
Win11 WAVx862852x/200x2.82: 4622x/200x
x643123x/245x2.82: 6088x/243x
So higher speed on 32-bit binary encoding, slower scanning on 32/64-bit.