mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-19 17:11:12 +02:00
Bug 765 - Delays using Edit commands and Draw Tool in long projects
A 4hr track used to take about 20s to cut a few samples. This is now significantly improved, to around 3s. Leland did this by (a) moving the size calculation to when we examine the undo history, so it isn't slowing down the edits. (b) in size calculation, using sizes that are cached rather than going to disk to find the sizes. (c) writing the autosave file which is to an FFIle to a string first, i.e. using XMLStringWriter as a buffer for XMLFileWriter. Step (c) may also make autosave marginally safer, as the risk of a partially updated autosave file is reduced.
This commit is contained in:
committed by
James Crook
parent
cedc6975e8
commit
2457579091
@@ -117,14 +117,7 @@ HistoryWindow::HistoryWindow(AudacityProject *parent, UndoManager *manager):
|
||||
S.EndVerticalLay();
|
||||
// ----------------------- End of main section --------------
|
||||
|
||||
// Vaughan, 2010-07-30: AudacityProject::OnHistory always calls Show()
|
||||
// then HistoryWindow::UpdateDisplay, so no need to do it here.
|
||||
// Vaughan, 2010-10-16: Not on Windows, anyway.
|
||||
// But Steve reported that on Ubuntu, View > History now crashes,
|
||||
// so restore it for non-Windows.
|
||||
#ifdef __WXGTK__
|
||||
DoUpdate();
|
||||
#endif
|
||||
DoUpdate();
|
||||
mList->SetMinSize(mList->GetSize());
|
||||
Fit();
|
||||
SetMinSize(GetSize());
|
||||
@@ -147,6 +140,8 @@ void HistoryWindow::DoUpdate()
|
||||
{
|
||||
int i;
|
||||
|
||||
mManager->CalculateSpaceUsage();
|
||||
|
||||
mList->DeleteAllItems();
|
||||
|
||||
mSelected = mManager->GetCurrentState() - 1;
|
||||
|
Reference in New Issue
Block a user