View Issue Details
ID  Project  Category  View Status  Date Submitted  Last Update 

0003390  ardour  bugs  public  20100809 20:53  20120614 10:45 
Reporter  mikkl  Assigned To  
Priority  normal  Severity  minor  Reproducibility  always 
Status  feedback  Resolution  open  
Product Version  SVN/2.0ongoing  
Summary  0003390: gui slow down when zooming in repeatedly  
Description  After repeatedly zooming in (zoom in until highest zoom level is reached. then zoom out and zoom in again some more times) dragging the timeline scrollbar gets more and more choppy and unresponsive, a little lag is also introduced. The issue can be reproduced as follows: 1. Open a new session. 2. Zoom in to highest zoom level (horizontally) 3. Zoom back out (e.g. Zoom to session) 4. Repeat steps 2 and 3 a few (0000009:0000005) more times until a effect is visible.  
Additional Information  The issue can be reproduced with a clean new session without any tracks. Zooming out, zooming in vertically or dragging around the timeline scrollbar doesn't cause this behaviour. Also, vertical zooming or zooming in general is not affected by the issue, it's only just the dragging of the timeline bar that gets slow. When only zooming in ONE step and then zooming out again repeatedly no negative effect can be noticed. For normal behaviour, Ardour has to be restarted. Loading another session doesn't fix it.  
Tags  No tags attached.  

Update: When disabling measures (View > uncheck "Show measures"), the issue does not appear. However, when a slowdown has become effective, disabling measures doesn't fix it. 

Good catch! It looks like there is a problem with the number of canvas lines used for the measures everincreasing... I'll look into this further. 

Are you happy to build Ardour from source? If so, please could you try the attached patch. I can't reproduce the slowdown here, but it may just possibly fix it. 
20100809 22:50

3390.1.patch (599 bytes)
diff git a/gtk2_ardour/tempo_lines.cc b/gtk2_ardour/tempo_lines.cc index e8bd034..04e584c 100644  a/gtk2_ardour/tempo_lines.cc +++ b/gtk2_ardour/tempo_lines.cc @@ 213,7 +213,7 @@ TempoLines::draw (ARDOUR::TempoMap::BBTPointList& points, double frames_per_unit } // Create a new line  } else if (_lines.size() < needed  _lines.size() < MAX_CACHED_LINES) { + } else if (_lines.size() < needed && _lines.size() < MAX_CACHED_LINES) { //cout << "*** CREATING LINE" << endl; assert(_lines.find(xpos) == _lines.end()); line = new ArdourCanvas::SimpleLine (*_group); 

Tried your patch but unfortunately the problem still exists. 
20100809 23:49

3390.2.patch (1,336 bytes)
diff git a/gtk2_ardour/editor_tempodisplay.cc b/gtk2_ardour/editor_tempodisplay.cc index 92efed3..d214bc0 100644  a/gtk2_ardour/editor_tempodisplay.cc +++ b/gtk2_ardour/editor_tempodisplay.cc @@ 200,6 +200,8 @@ Editor::draw_measures () } tempo_lines>draw(*current_bbt_points, frames_per_unit); + + cout << "After draw_measures: " << tempo_lines>_lines.size() << "\n"; } void diff git a/gtk2_ardour/tempo_lines.cc b/gtk2_ardour/tempo_lines.cc index e8bd034..04e584c 100644  a/gtk2_ardour/tempo_lines.cc +++ b/gtk2_ardour/tempo_lines.cc @@ 213,7 +213,7 @@ TempoLines::draw (ARDOUR::TempoMap::BBTPointList& points, double frames_per_unit } // Create a new line  } else if (_lines.size() < needed  _lines.size() < MAX_CACHED_LINES) { + } else if (_lines.size() < needed && _lines.size() < MAX_CACHED_LINES) { //cout << "*** CREATING LINE" << endl; assert(_lines.find(xpos) == _lines.end()); line = new ArdourCanvas::SimpleLine (*_group); diff git a/gtk2_ardour/tempo_lines.h b/gtk2_ardour/tempo_lines.h index 843d94a..6897608 100644  a/gtk2_ardour/tempo_lines.h +++ b/gtk2_ardour/tempo_lines.h @@ 44,7 +44,7 @@ public: void show(); void hide(); private: +//private: #ifdef GTKOSX typedef std::map<double, ArdourCanvas::SimpleLine*, std::less<double> > Lines; #else 

Could you try the .2.patch attached, trigger the bug and then attach the console output to this bug? 

Ok, what i did was the zooming in and out, which can be noticed by the numbers going up and then they decrease with higher zoom levels till 1. Scrolling can be seen when the numbers are the same, but i didn't notice any difference of the numbers when it is slow or normal. 
20100810 17:42



I can confirm that I have exactly the same behaviour and unchecking the "show measures" option does indeed prevent the slow down occurring, but not fix it when slow down happens. I'm using 2.8.2 on Ubuntu Karmic 64bit. I'd really love to get this bug resolved so please advise if there are any steps I can take to help debug. I'm not particularly experienced with compiling from source, but very willing to learn. 

Hmm, i have tested some more and now I have 2 amd64 boxes with different hardware that suffer from the slowdown and one i686 box that doesn't. Maybe there's a relation? Also I noticed that there's one zoom level where there's a space at the left of the editor window which has a width of ca. 20% of the total width of the editor window where no measures are drawn. But this could possibly be another problem... 

@mikkl: that second point is another problem, indeed. it would be really good if someone could follow up on cth103's request for console output for his patch ... 
20110331 16:15

a2patch2.txt (11,765 bytes)
After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 94 After draw_measures: 58 After draw_measures: 38 After draw_measures: 25 After draw_measures: 16 After draw_measures: 12 After draw_measures: 9 After draw_measures: 7 After draw_measures: 6 After draw_measures: 5 After draw_measures: 4 After draw_measures: 4 After draw_measures: 4 After draw_measures: 4 After draw_measures: 4 After draw_measures: 4 After draw_measures: 4 After draw_measures: 4 After draw_measures: 4 After draw_measures: 4 After draw_measures: 4 After draw_measures: 1 After draw_measures: 95 After draw_measures: 60 After draw_measures: 128 After draw_measures: 93 After draw_measures: 58 After draw_measures: 38 After draw_measures: 24 After draw_measures: 19 After draw_measures: 12 After draw_measures: 10 After draw_measures: 7 After draw_measures: 6 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 1 After draw_measures: 95 After draw_measures: 60 After draw_measures: 128 After draw_measures: 93 After draw_measures: 58 After draw_measures: 38 After draw_measures: 24 After draw_measures: 19 After draw_measures: 12 After draw_measures: 10 After draw_measures: 7 After draw_measures: 6 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 1 After draw_measures: 95 After draw_measures: 60 After draw_measures: 128 After draw_measures: 93 After draw_measures: 58 After draw_measures: 38 After draw_measures: 24 After draw_measures: 19 After draw_measures: 12 After draw_measures: 10 After draw_measures: 7 After draw_measures: 6 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 1 After draw_measures: 95 After draw_measures: 60 After draw_measures: 128 After draw_measures: 93 After draw_measures: 58 After draw_measures: 38 After draw_measures: 24 After draw_measures: 19 After draw_measures: 12 After draw_measures: 10 After draw_measures: 7 After draw_measures: 6 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 1 After draw_measures: 95 After draw_measures: 60 After draw_measures: 128 After draw_measures: 93 After draw_measures: 58 After draw_measures: 38 After draw_measures: 24 After draw_measures: 19 After draw_measures: 12 After draw_measures: 10 After draw_measures: 7 After draw_measures: 6 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 1 After draw_measures: 95 After draw_measures: 60 After draw_measures: 128 After draw_measures: 93 After draw_measures: 58 After draw_measures: 38 After draw_measures: 24 After draw_measures: 19 After draw_measures: 12 After draw_measures: 10 After draw_measures: 7 After draw_measures: 6 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 1 After draw_measures: 95 After draw_measures: 60 After draw_measures: 128 After draw_measures: 93 After draw_measures: 58 After draw_measures: 38 After draw_measures: 24 After draw_measures: 19 After draw_measures: 12 After draw_measures: 10 After draw_measures: 7 After draw_measures: 6 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 5 After draw_measures: 6 After draw_measures: 6 After draw_measures: 6 After draw_measures: 6 After draw_measures: 6 After draw_measures: 6 After draw_measures: 6 After draw_measures: 6 After draw_measures: 6 After draw_measures: 3 After draw_measures: 3 After draw_measures: 3 After draw_measures: 3 After draw_measures: 3 After draw_measures: 3 After draw_measures: 4 After draw_measures: 6 After draw_measures: 6 After draw_measures: 8 After draw_measures: 11 After draw_measures: 18 After draw_measures: 18 After draw_measures: 22 After draw_measures: 22 After draw_measures: 22 After draw_measures: 25 After draw_measures: 25 After draw_measures: 25 After draw_measures: 25 After draw_measures: 25 After draw_measures: 25 After draw_measures: 25 After draw_measures: 25 After draw_measures: 25 After draw_measures: 25 After draw_measures: 25 After draw_measures: 25 After draw_measures: 25 After draw_measures: 25 After draw_measures: 25 After draw_measures: 25 After draw_measures: 25 After draw_measures: 25 After draw_measures: 25 After draw_measures: 25 After draw_measures: 25 After draw_measures: 25 After draw_measures: 25 After draw_measures: 25 After draw_measures: 25 After draw_measures: 25 After draw_measures: 25 After draw_measures: 26 After draw_measures: 40 After draw_measures: 63 After draw_measures: 102 After draw_measures: 128 After draw_measures: 67 After draw_measures: 128 After draw_measures: 67 After draw_measures: 1 After draw_measures: 1 After draw_measures: 1 After draw_measures: 1 After draw_measures: 1 After draw_measures: 67 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 67 After draw_measures: 67 After draw_measures: 76 After draw_measures: 95 After draw_measures: 109 After draw_measures: 114 After draw_measures: 122 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 128 After draw_measures: 103 After draw_measures: 65 After draw_measures: 42 After draw_measures: 29 After draw_measures: 19 After draw_measures: 19 After draw_measures: 25 After draw_measures: 25 After draw_measures: 25 After draw_measures: 25 After draw_measures: 25 After draw_measures: 25 After draw_measures: 25 After draw_measures: 25 After draw_measures: 25 After draw_measures: 25 After draw_measures: 25 After draw_measures: 25 After draw_measures: 25 After draw_measures: 25 After draw_measures: 25 After draw_measures: 25 After draw_measures: 25 After draw_measures: 25 After draw_measures: 26 After draw_measures: 40 After draw_measures: 63 After draw_measures: 102 After draw_measures: 128 After draw_measures: 67 After draw_measures: 1 After draw_measures: 67 After draw_measures: 128 After draw_measures: 102 After draw_measures: 128 

Hi, I've uploaded the console ouput of a session running with the 2nd patch. I can't say I'm really suffering from this bug, it's only subtly but it's there. @mikki & @paul: this second problem is not there without the patch, so it has to do with it somehow. It appears in the view where you see a bit more than 1 hour. svn is 7832 
Date Modified  Username  Field  Change 

20100809 20:53  mikkl  New Issue  
20100809 20:56  mikkl  Note Added: 0008761  
20100809 22:31  cth103  Note Added: 0008764  
20100809 22:50  cth103  Note Added: 0008765  
20100809 22:50  cth103  Status  new => feedback 
20100809 22:50  cth103  File Added: 3390.1.patch  
20100809 23:36  mikkl  Note Added: 0008766  
20100809 23:49  cth103  File Added: 3390.2.patch  
20100809 23:49  cth103  Note Added: 0008767  
20100810 17:42  mikkl  Note Added: 0008796  
20100810 17:42  mikkl  File Added: ardour.out  
20100820 19:44  confusion_music  Note Added: 0008869  
20100824 20:20  mikkl  Note Added: 0008898  
20110331 14:37  paul  Note Added: 0010449  
20110331 16:15  realhangman  File Added: a2patch2.txt  
20110331 16:23  realhangman  Note Added: 0010450 