Audacity Bug Summary
••• Introduction •••
••• Keywords •••
    Audacity 3.0.3 development began 19th April 2021

Audacity Bugzilla



Bug 2457 - Windows: WAV Export runs 6 to 7 times slower than on 2.3.3
Windows: WAV Export runs 6 to 7 times slower than on 2.3.3
Status: RESOLVED FIXED
Product: Audacity
Classification: Unclassified
Component: Application Core
2.4.1
PC Windows 10
: P1 Repeatable
Assigned To: Default Assignee for New Bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2020-05-28 07:52 UTC by Peter Sampson
Modified: 2020-06-11 10:27 UTC (History)
7 users (show)

See Also:
Steps To Reproduce:
1) launch 2.3.3 2) Tracks > Add New > Stereo Track 3) Generate a one hour chirp 4) Export as 16-bit PCM WAV (default) 5) Record the export time 6) close 2.3.3 7) Repeat with 2.4.1 (or 2.4.2 alpha) 8) Observe the Export runs 6 to 7 times slower on 2.4.x than 2.3.3
Release Note:
First Git SHA:
Group: ---
Workaround:
Closed: 2020-05-29 00:00:00
petersampsonaudacity: Quickfix‑Requested+
petersampsonaudacity: Regression+
petersampsonaudacity: Test‑OK‑Win+
petersampsonaudacity: Test‑OK‑Mac+


Attachments
WAV and MP3 Export speed tests (18.00 KB, application/vnd.ms-excel)
2020-05-28 07:52 UTC, Peter Sampson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Sampson 2020-05-28 07:52:11 UTC
Created attachment 983 [details]
WAV and MP3 Export speed tests

On Windows WAV Export runs 6 to 7 times slower than on 2.3.3
Thus a regression on 2.3.3

But there was lao a regression 2.2.2 to 2.3.9 where the WAV export time doubled.

So now with 2.4.x we Export WAV files 12 to 14 times slower than our track record.

I have attached a spreadsheet to show my timing tests.

Note that over time in contrast we have significantly improved MP3 exports on Windows.


But also note that on my MacBook Catalina WAV exports are blindingly fast compared to my W10 laptop - twice as fast as out best ever on Windows/


This issue was first reported by Forum user fortchagos:
https://forum.audacityteam.org/viewtopic.php?f=50&t=111219&p=396135
Comment 1 Steve Daulton 2020-05-28 10:11:31 UTC
My results with 1 hour stereo track:

Linux (budget i7 laptop with SSD):
Shaped dither: 16 seconds
No dither: 4 seconds

macOS (i7 Mac Mini with SSD):
Shaped dither: 7 seconds
No dither: 3.5 seconds


macOS is extraordinarily fast applying shaped dither. Must be some good optimizations happening.
Comment 2 Peter Sampson 2020-05-28 10:25:56 UTC
(In reply to Steve Daulton from comment #1)
OK my results - one hour stereo chirp

W10:
Shaped dither: 198 seconds
No dither: 88 seconds

macOS Catalina 10.15.4:
Shaped dither: 7 seconds
No dither: 3 seconds

so it looks like the dither takes up roughly half the time om both platforms - but the Mac is blindingly fast compared to the W10-PC and both are expensive SSD models.

But dither is recommended - and is our default setting.
Comment 3 Leland Lucius 2020-05-28 12:48:21 UTC
Wow...I thought there just HAD to be something wrong with Peter's machine. :-)  But, I can confirm:

Windows (i9 @ 5GHz with SSD #1), shaped dither:
2.4.2: 120 seconds
2.2.2: 12 seconds
Export and temp files location set to SSD #1 (Windows boot drive)

Windows (i9 @ 5GHz with SSD #2), shaped dither:
2.4.2: 118 seconds
2.2.2: 12 seconds
Export and temp files location set to SSD #2

Windows (i9 @ 5GHz with SSD #1 and #2), shaped dither:
2.4.2: 120 seconds
2.2.2: 12 seconds
Temp files location set to SSD #1 and export to SSD #2

Now, here's the fun stuff... :-)

Linux (VM running under above Windows machine on SSD #2), shaped dither:
2.4.2: 13 seconds
Comment 4 Leland Lucius 2020-05-28 14:10:36 UTC
Yep, just as I suspected.  The old build process gets the timings back to normal.  I'll compare all options between the cmake and old build processes.
Comment 6 Peter Sampson 2020-05-29 05:47:53 UTC
(In reply to Leland Lucius from comment #5)
Testing on W10 with Audacity 2.4.2 ef98e5d

I see no improvement at all with this latest W10 alpha - exactly the same time as yesterdays' test 5 mins 15 seconds = 195 seconds on exporting a one hour stereo chirp.

Accordingly I have to re-open this
Comment 8 Peter Sampson 2020-05-29 10:52:51 UTC
(In reply to Leland Lucius from comment #7)
Testing on W10 with Audacity 2.4.2 5bede69

We have now got it back to 2,3.3 performance - exporting a one-hour stereo WAV in31 seconds (versus 230 in 2.3.3) close enough.

But we're still twice as slow as we were in 2.2 and earlier where the same export takes 15 seconds (but unlike the recent performance change 2.3=>2.4 no-one noticed or complained about the 2.2=>2.3 performance hit).

And its still much faster on Mac Catalina a mere 7 seconds.


Curiously both the Chirp generation and the MP3 export both took a little longer with this build

a) Chirp 29 seconds versus 22 seconds

b)MP3 export 57 seconds versus 54 seconds


So my question is are we happy to close this bug now that we can at least match 2.3.x performance - or do we want to go further and aim for 2.2.x performance ?
Comment 9 James Crook 2020-05-29 11:01:29 UTC
Yes.  Close it.  The P1 bug is gone.  It does not hold up 2.4.2.

Performance generally should be dealt with by test scripts that time.
Comment 10 Peter Sampson 2020-06-11 10:27:16 UTC
It looks like this may have also affected AC3 exports too - but also now cleared up.

See this Forum thread:
https://forum.audacityteam.org/viewtopic.php?f=46&t=111496&p=397389