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

Audacity Bugzilla



Bug 218 - Windows: Excessive delays fitting long projects to window, and progress dialog whited out after import or effect.
Windows: Excessive delays fitting long projects to window, and progress dialo...
Status: RESOLVED WORKSFORME
Product: Audacity
Classification: Unclassified
Component: User Interface
2.1.1
PC Windows (all)
: P2 Repeatable
Assigned To: Default Assignee for New Bugs
: Slow
: 1339 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-08-29 01:25 UTC by Gale Andrews
Modified: 2018-08-20 11:46 UTC (History)
4 users (show)

See Also:
Steps To Reproduce:
1 Start with clean project 2 Record for an hour or more 3 View > Fit in Window or Fit button 4 Unless you wait 20 to 40 seconds or so, clicking the Fit button again after nothing happens gives the circular busy pointer, then clicking Fit button again whites out Audacity non-responding. 5 Save the project but do not close it 6. Zoom in about six steps, delete or add a little section, File > Save Project As to a new name. 7 Close the project you saved as. 8 Compare several times how long it takes to open the zoomed in and fitted projects - the fitted usually takes much longer to open. Close all projects. 9 Import an hour or longer file by copy in. Progress dialogue may white out for 5 to 10 seconds after completion before the waveform appears. 10 Apply an effect to the whole track. After the effect progress bar completes, the dialogue may white out for 5 to 10 seconds before the waveform is redrawn. The above symptoms are there too on my Linux netbook, just less common and less severe.
Release Note:
GROUP:Bugs requiring more investigation * (Windows) There may be substantial delays drawing the waveform in longer projects of an hour or more. The main problems are with opening saved projects that were fitted to the window, and fitting already zoomed in projects to the window, such as a new recording. Additionally: ** Opening and closing large projects one after the other may eventually cause project opening to slow significantly ** Import or effect progress dialogs may stall "whited out" for a few seconds after the progress bars complete before the waveform is drawn.
First Git SHA:
Group: ---
Workaround:
Closed: 2018-08-20 00:00:00
gale: Regression-


Attachments
Slow draw during load (155.51 KB, video/x-ms-wmv)
2015-09-04 13:37 UTC, Leland Lucius
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gale Andrews 2010-08-29 01:25:45 UTC
A progress dialogue for waveform drawing is needed (Bug 217). Michael suggested  race conditions may be behind the delays.
Comment 1 Gale Andrews 2011-04-13 12:56:21 UTC
For me on Windows XP or 7, 1.2.6 can show the waveforms immediately or with say a 10 seconds delay much of the time. 1.3.13 can do so too, but that is probably about one time in ten.  

As I side note, I can't usually afford the time to reboot, shut all apps
down and then work on a long project, but if I do, the drawing behaviour isn't "that" much better, if at all, in 1.3.13 or 1.2.6.
Comment 2 Gale Andrews 2012-03-28 03:53:59 UTC
Marked as regression on 1.2. Affected users consistently say 1.2 is faster.
Comment 3 Peter Sampson 2015-03-28 11:06:16 UTC
I don't think this is a moonphase bug at all, I get it all the time with longer projects the one or two hours that I regularly record.  

In fact anything that requires a redraw when zoomed out a long way or zoomed-to-fit on projects of that size, for example an Amplify, will cause me to wait many seconds (often up to 20 or 30 seconds).  This has always seemed an unconscionably long time, but it is something /I have come to live with and "expect" as an Audacity bugbear.

The same obtains if you save a long project that is zoomed-to-fit and the later re-open it.  It then also takes a long time to draw the project waveform.
Comment 4 James Crook 2015-03-28 11:10:50 UTC
Per comment #3 moonphase->repeatable
Comment 5 Gale Andrews 2015-04-01 13:15:00 UTC
Promoted to P2 as agreed in offlists with James and Peter. 

Not sure if this bug has the exact same cause as sluggish editing (bug 765) so leaving them separate for now.
Comment 6 Leland Lucius 2015-04-27 14:29:57 UTC
Peter,

Is this still a problem for you with recent builds?

Leland
Comment 7 Peter Sampson 2015-04-28 07:06:26 UTC
(In reply to Leland Lucius from comment #6)
Leland,  it certainly seems snappier when redrawing after edits on a long project, testing on a 2 hour project this morning - editing at project fit to screen and also Moving to fit-on-screen to normal zoom level and with zooming out a bit then editing and then going back to fit-to-screen all seems much snappier these days.

The one thing that is still slow is the initial fit-to-screen after making the recording at normal zoom level.  It took 45 seconds for the fit-to-screen to be drawn.

But then shifting from fit-to-screen to normal zoom and then back again therafter is brisk.
Comment 8 Leland Lucius 2015-05-24 07:45:45 UTC
Seems to be fixed, so marking as such.
Comment 9 Gale Andrews 2015-06-03 23:40:21 UTC
(In reply to Peter Sampson from comment #7)
> The one thing that is still slow is the initial fit-to-screen after making 
> the recording at normal zoom level.  It took 45 seconds for the fit-to-screen 
> to be drawn.
> But then shifting from fit-to-screen to normal zoom and then back again
> therafter is brisk.
Yes I concur, on my two Windows spinning disk machines. The greater speed of fitting in 1.2.6 is very noticeable. Bug REOPENED and steps updated.    

I agree zooming in on a fitted project seems to be much better, so I removed that from the title, which is now "Excessive delays fitting long projects to window, and progress dialog whited out after import or effect."

The whiting out does seem somewhat improved, but not enough to close it. I think users would rather see another 10 seconds on the progress dialogue than see the dialogue white out after apparent completion before the waveform appears.
Comment 10 Leland Lucius 2015-09-04 13:37:46 UTC
Created attachment 624 [details]
Slow draw during load

Gale, is this the kind of thing you're seeing?  Sorry the video isn't full screen, but it does show a definitely drawing issue when loading a 2 hour .aup.
Comment 11 Paul L 2016-01-28 12:07:17 UTC
I have a 3.6 GHz processor.  I don't notice the long delays, even when opening a project with 16 hours of generated white noise, in a Windows Release build.

I do see long delays in a Debug build, and surprisingly, they involve much copying of wxFileName objects:  interrupting the debugger during the delays always takes me to a stack with that in it.

It might be optimizing the wrong thing to avoid those copies -- who knows what other diagnostic code is compiled out of release versions of wxWidgets -- but I think there is no harm in trying.
Comment 12 Paul L 2016-01-28 12:12:28 UTC
No wait, I think I am seeing the delays even in release.  Good, I have something to go on now.
Comment 13 Paul L 2016-01-28 14:12:11 UTC
I am seeing the big delays if I open and close my big file of noise repeatedly.  The first two openings are fast, but they seem to get increasingly slow after that.

I see this even in my release builds, and even when I detach the debugger, but oddly I don't see this in downloaded Audacity 2.1.2.  Curious.

So again I am not sure what the exact conditions are for the bug and whether I am fixing the right thing.
Comment 14 Paul L 2016-01-28 17:30:20 UTC
Now I think I can reproduce the problem in my release build, even if a sync my source tree to the tag Audacity-2.1.2.  But I can't reproduce it in the downloaded Audacity 2.1.2 !  Presumably the binaries are all the same.

What difference in installations could account for that?
Comment 15 Paul L 2016-02-04 09:46:29 UTC
I would like Peter to retest after this commit:
https://github.com/audacity/audacity/commit/9ca1e32e5bcd742f4aaecc435a8d5df44d555544

I am not marking Fix Made yet because there may be several things to do here to improve performance.  But I think this commit should make some significant improvement.
Comment 16 Peter Sampson 2016-02-08 10:55:47 UTC
Tested on W10 on audacity-win-r9ca1e32-2.1.3-alpha-07-feb-16

Seems pretty much the same as befor except that long projects seem to open quicke and cleaner.  Testing with a 2 hour project.

1) Project opens at normal zoom - it seems to open much quicker (I have no empiricalevidence for this).  But it is definitely cleaner in that I don'y get the jumbled graphics at the bottom toolbar area of the screen that I've been used to getting for years now with opening large projects.

2) Zoom fit projrcct to scene seems to take as long as in previous versions.  No indication of progress - but if I click a few times on the Audacity window it hazes out pale and I get t the blue spinning donut.

3) After the Zoom, Amplify,  This takes c. 3:30 but ater it's completed the amplify calc at Remaining Time = 0 I also get no indication of progress and again if I click a few times on the Audacity window it hazes out pale and I get t the blue spinning donut.  This recalculation of the drawn image (I assume that's what's taking place) takes another c. 45 seconds

The behaviors in 2 and 3 are what I've always been used to - and got used to putting up with.
Comment 17 Paul L 2016-02-08 11:32:17 UTC
(In reply to Peter Sampson from comment #16)
I made a separate issue bug 1319 just for opening.

I don't recall mention of "jumbled graphics" on the toolbar.  That's not the performance problem.  Is that bug listed elsewhere?

Can you do a comparison with the 2.1.2 release to quantify the improvements in opening?

As I said, I did some but not all of the work that looks promising, but this problem might depend much on individual machines' characteristics.  I suspect subtleties of memory fragmentation and cache usage.
Comment 18 Peter Sampson 2016-02-08 11:45:42 UTC
No I've never mentioned "jumbled graphics" before, because I could never capture a screen-shot - it's just something else I've got used to and ignore over the years.

Will try to do some proper timed comparisons versus 2.1.2 - but I'm assuming that I need different 2-hour projects to avoid caching issues?  The very earliest I can get to this is tomorrow probably.
Comment 19 Paul L 2016-02-08 12:47:22 UTC
(In reply to Peter Sampson from comment #18)
No, I am referring to processor cache locality.  Please test the same large project with different executables.
Comment 20 Peter Sampson 2016-02-09 06:29:46 UTC
Testing on 2.1.2 versus audacity-win-r9ca1e32-2.1.3-alpha-07-feb-16
with a 2-hour project

Shows no speed improvement in Fit Project from normal F2 zoom level - both weigh in at c. 44 seconds.

Similarly the redraw of the waveform after after a Noise Reduction and an Amplify both take c. 44 seconds on both executables.


For the user there are a number of disconcerting things going on here:

1) During the Amplify/NR on the two hour project the user is presented with a countdown for the effect in a progress dialog.

2) When the countdown reaches zero the progress dialog disappears - but Audacity just sits there (user thinks "whats happening") as there is no progress dialog for the redraw, even though the redraw is fairly time consuming.  Nor is is there any other visual cue to indicate that Audacity is actually doing anything.

3) User gets impatient and clicks 3 or 4 times in the Audacity Window.

4) Then it gets really disconcerting as this is when the Audacity window gets whited out (actually paled out) and the user gets a message at top left of the Window to say "Audacity not responding".


So while it would be nice to improve the speed of the redraw for Fit Project for long projects and then the redraw on subsequent effects that change the waveform.  I am more concerned that the GUI does not it inform the user that Audacity is actually working on something, what it's doing and how long it might take - i.e. the redraw itself could do with a progress dialog.

But note that the NR takes 7 minutes or so and the Amplify 4:30 (on both executables) or so - thus the extra 45 seconds is a small part of that - but a progess monitor would still be useful to the user.
Comment 21 Peter Sampson 2016-02-09 06:35:32 UTC
I have copied the above notes from my Comment #20 to Bug #217 Progress dialogue/better handling needed for waveform drawing
Comment 22 Gale Andrews 2016-04-21 23:41:58 UTC
(In reply to Peter Sampson from comment #20)
I compared 2.1.2 release with audacity-win-r79a25b1-2.1.3-alpha-21-apr-16.zip on Windows 10 (2.4 GHz, dual core, 6 GB RAM, HDD). I prepared a 10 hour mono noise track, fitted to window and saved project. I opened the project in 2.1.2 then ran Normalize on the complete track. I quit and repeated the process another two times. Then I did the same for 2.1.3-alpha.   

I saved to C:\ (80 GB free before saving, only system files and folders are on C:\ apart from the AUP).

Not responding/whiteout duration before waveform of AUP appears:
2.1.2: 30 seconds, 35 seconds, 35 seconds   
2.1.3-alpha: 12 seconds, 15 seconds, 18 seconds.

Not responding/whiteout duration after Normalize completes:
2.1.2: 25 seconds, 30 seconds, 30 seconds
2.1.3-alpha: 30 seconds, 40 seconds, 30 seconds.   

So for some reason I see a strong improvement after opening but not normalize.   

Next I zoomed into the project six times, deleted a few seconds, saved and closed.  

Times to open zoomed in project:
2.1.2: 5 seconds, 5 seconds, 4 seconds, no whiteouts
2.1.3-alpha: 5 seconds, 6 seconds, 5 seconds, no whiteouts. 

Times to then fit the project     
2.1.2: 2 seconds each time, no whiteouts
2.1.3-alpha: 2 seconds each time, no whiteouts.

If I then zoom in six times and fit the project, both 2.1.2 and 2.1.3-alpha take about 2 seconds each time, no whiteouts.  

So is this now a bad test of the fit, because of caching somewhere, and I should reboot? I'll try that tomorrow, opening a project that was saved in Zoom Normal state.
Comment 23 Paul L 2016-04-22 09:40:18 UTC
It seems I accomplished something for bug 1319 but not for this original one.
Comment 24 Peter Sampson 2017-08-10 13:40:50 UTC
(In reply to Paul L from comment #23)
Still happening in 2017
Comment 25 Peter Sampson 2017-10-28 12:49:31 UTC
(In reply to Peter Sampson from comment #24)
Remains a problem on my old laptop with just a spinning metal disk for longer 1-3 hour projects.

But on my new HP laptop with the 256GB SSD and 1TB spinning metal disk - a three hour project opens straight away with no delay - no unsetting graphics (it's set up with the OS apps and active data including active Audacity projects all on the SSD)
Comment 26 Peter Sampson 2017-11-26 11:42:11 UTC
This problem is exacerbated by the fact that there is no progress indicator to indicate progression through the "open" process (as there is with the application of effects on such large projects - which serve to reassure the user that something is happening and progress is being made). 

Accordingly I would recommend that we add a Progress Bar to the "Open" process.

Note that Import already has such a Progress Bar.
Comment 27 Peter Sampson 2017-11-26 11:46:01 UTC
*** Bug 1339 has been marked as a duplicate of this bug. ***
Comment 28 Peter Sampson 2017-11-27 06:57:31 UTC
Bug #1319 looks to be a duplicate of this one
Comment 29 Peter Sampson 2018-02-21 13:50:31 UTC
Testing on 2.2.2 W10 on my Laptop with the 256 GB SSD 

With this powerful fast PC I see no delays or whiteouts in any of the Steps to reproduce


As with companion bug #1310 It seems to me that for a large data set - you need a powerful PC.

I can recall no recent complaints about this on the Forum so I am going to close this as WORKSFORME