Darrell Walisser
2016-09-11 14:33:30 UTC
In the spectrogram view, live resizing a stereo track lags severely, either
by dragging the middle divider or edge. Once the mouse stops dragging (drag
paused) or button is released (drag ends) it finally gets to draw. If the
track is mono, there is no lag issue.
The reason for lag appears to be a flood of calls to
TrackArtist::UpdateVRuler originating from here:
void TrackPanel::OnTrackListResized(wxCommandEvent & e)
{
Track *t = (Track *) e.GetClientData();
UpdateVRuler(t);
e.Skip();
}
If the call to UpdateVRuler here is removed, the problem disappears. Why
this is exactly, I can't say. I suspect there is a recursion, e.g.
UpdateVRuler causes a resize event, then ends up back in UpdateVRuler
again. But it only occurs in spectrogram view for some reason. Another
oddity, while playing back a track, the resize is responsive again.
In any case, since UpdateVRuler is called separately before every refresh
of track anyways, I think this is OK to remove.
by dragging the middle divider or edge. Once the mouse stops dragging (drag
paused) or button is released (drag ends) it finally gets to draw. If the
track is mono, there is no lag issue.
The reason for lag appears to be a flood of calls to
TrackArtist::UpdateVRuler originating from here:
void TrackPanel::OnTrackListResized(wxCommandEvent & e)
{
Track *t = (Track *) e.GetClientData();
UpdateVRuler(t);
e.Skip();
}
If the call to UpdateVRuler here is removed, the problem disappears. Why
this is exactly, I can't say. I suspect there is a recursion, e.g.
UpdateVRuler causes a resize event, then ends up back in UpdateVRuler
again. But it only occurs in spectrogram view for some reason. Another
oddity, while playing back a track, the resize is responsive again.
In any case, since UpdateVRuler is called separately before every refresh
of track anyways, I think this is OK to remove.