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 change is believed to be a direct refactoring that does not change functionality. It paves the way for more complex kinds of selection, such as selections involving frequency as well as time. It also reduces risk of left and right edges being swapped in future code using SelectedRegion, as the default is to swap on assignment if needed.
Must more extensive review of saving state
Try this one David. I reviewed all actions in Menus.cpp and have added state
saving where it seemed to be missing. I had no idea it would be so many (22).
And that was only reviewing Menus.cpp. I believe that will get them all since
all keyboard actions are tied to a menu or command action and they all go
through Menus.cpp. (I still have a few to review in TrackPanel.cpp though)