... You may see this also when abandoning lots of redo history, and not only
when doing compaction.
If in compaction you discard much undo and also much redo, you may see two
progresses.
It's debatable whether this might have been better implemented by reuse of
ProjectFileIO::DeleteBlocks instead, putting callbacks to a progress indicator
in the function InSet(). But I wanted to avoid more dependency onto
ProjectFileIO.
Doing real work in DeleteBlocks() is supposed to happen only if there is a bug
elsewhere that allowed orphans. So, still no progress indicator there.
... Do so by lowering the usage of TransactionScope into UndoManager, so that
deletion of blocks is more often grouped into a transaction, as when invoking
Compact via the menu item.
... This is a more adventurous fix. It avoids changing the schema.
Use non-positive values of SqliteSampleBlock::mBlockID to store lengths of
blocks of silence. Keep SqliteSampleBlock structures in memory (sharing where
possible for recurring block lengths) but do not make corresponding rows in
the database table.
Reviewed all uses of mBlockID, and of SqliteSampleBlock::GetBlockID() which
returns it, and of XML attribute "blockid" which persists it.
* Revert "[Bug 2533] New: Extreme space inefficiency importing silence from an AUP file"...
... It did not fix the symptoms. Using a zero blob only gives temporary
in-memory space efficiency when adding a row to the database, not space savings
in the file.
This reverts commit d9047dfd254ecf92c0770c0cbda62a238c2fdd29.
* Remove unused SampleBlockFactory::Get
* Eliminate some repetition and magic numbers
* Lower some common steps into GetSummary(); removed unused argument
* mSummary256Bytes and mSummary64kBytes not needed after initialization
* Satisfy sample and summary requests for silent blocks without using db
* More format fixes on import: beware sequences with differing format...
... It could happen. When collecting file information to be used in the
second pass, record the correct format for each.
Don't mistakenly use whatever was the format of the last read Sequence for all
files.
This only matters for the avoidance of unnecessary sample format conversions
when finally appending samples to tracks. It won't affect the space ultimately
occupied in the database.
* Cautions against double throw in a finally block
* Fix some Doxygen in ImportAUP.cpp
... Don't have special knowledge of "blockid" in ProjectSerializer, which should
be very low-level.
Instead, we can deserialize the project first, and use the block ids collected
by the sample block factory since f137a1e.
* Remove unused member
* I think you want to null the clip pointer when done with it?
* Simplify end tag handling
* Clear tracks in one place, but it may not matter...
... The file handle object is destroyed and not reused in any case
* Log messages can be English
* Let first error message override any mere warning; comments, assertion
* Remove unreachable code -- see the loop preceding it
* fix more unreachable code
* Correct unusual case of file names (is it used?)
* Re-use SFCall, in case we decide in future that the mutex does matter
... with database columns, so stop writing them and save some space.
This won't break loading of existing .aup3 files.
This required a bug fix in a SQL command too!
* Revert "AUP3: Don't delete sample blocks prematurely"
This reverts commit c1884349d595a2fb889c90f209ea4af3d1c70e1d.
* "Don't delete sample blocks prematurely" fixed otherwise...
... and very simply.
Problem was that, only for an interactive effect (like Bass and Treble), the
save point was created, rolled back, created again, then committed.
But (unlike with the non-savepoint commands, even if savepoint is outermost),
rolling back a savepoint really just rewinds it without removing it -- therefore
the second savepoint was inner, but the first (outer) was never committed, so
some changes failed to persist.
Solution: add a commit after rollback of savepoint to implement destructor
of AutoCommitTransaction.
The reversion of c188434 also leaves AutoCommitTransaction as a better RAII
style operation. Rollback changes by default -- keep changes only if
success is explicitly indicated.
* Rename AutoCommitTransaction as TransactionScope...
... More appropriately, since it's now the rollback that is automatic but
the commit that must be explicit
Cliff reported that if you apply a macro to "Files" and you had
a "saved project" open at the time, you would get the "not saved
properly" dialog when you next open that "saved project".
This should correct it...
... All old contents of audacity.dox moved to audacity.dox.in;
audacity.dox includes it and changes some options, to be run in nightly updates
of web pages;
nograph.dox also includes it, and is now fit for local usage by the developer,
generating only the same information as audacity.dox before (in only half a
minute on my machine), but easily editable to turn on selected graphs.