mirror of
https://github.com/cookiengineer/audacity
synced 2026-02-09 05:01:57 +01: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
@@ -543,8 +543,7 @@ wxLongLong SimpleBlockFile::GetSpaceUsage()
|
||||
return 0;
|
||||
} else
|
||||
{
|
||||
wxFFile dataFile(mFileName.GetFullPath());
|
||||
return dataFile.Length();
|
||||
return sizeof(auHeader) + mSummaryInfo.totalSummaryBytes + (GetLength() * SAMPLE_SIZE(floatSample));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user