#7313·audacity

Improve the logic determining if the project file needs to be compacted

Author: kryksyhCreated Sep 11, 2024Updated Sep 17, 2026
LabelsEnhancement Request

Your idea

Improve the logic determining if the project file needs to be compacted. Additionally, it may be useful to have an option for a user to force project compaction one-time or on each save.

Problem to be solved

Currently, the logic responsible for project compaction is rather fragile and can prevent the project from being compacted in certain situations.

Prior art

One of the more robust approaches is to vacuum the database on a certain threshold of free pages see: https://www.sqlite.org/pragma.html#pragma_freelist_count

Additional context

No response