Ardour duplicating midi files

I have noticed Ardour duplicating each midi file in the session when using “snapshot and switch to new version”. If you have 100 midi files to begin with then after using this “snapshot …” 10 times you have 1000 with 900 being exactly the same as the first 100. The large number of midi file copies starts to slow down the session.

I can’t think of a reason for Ardour creating duplicates this way so I created a bug report with video showing the behavior 0009547: Using "Snapshot and switch to new version" repeatedly becomes veru very slow after some time - MantisBT

Is this a bug or is there some explanation to this behaviour ?

I have now stopped using “snapshop …” and instead shut down Ardour and make a copy of the session file myself and the start Ardour again and load the new session file. This keeps my sessions lean and fast.

1 Like

I believe this is by design: the idea is that a snapshot is a complete independent version of the project, and since Ardour allows editing of MIDI files it has to make a copy of them for each new snapshot, otherwise edits made to MIDI regions in one snapshot would affect all other snapshots using the same MIDI file.

If (for disk space or speed reasons) you want MIDI files shared between snapshots, or at least you don’t mind that they are, then making a copy of the .ardour file is presently the best way.

Ok, thanks for the info.

I investigated some more and this seems to be the unfortunate consequence of the setting: Session / Properties / Midi / Midi region copies are independent. When this option is on the session is flooded with region duplicates and after a while the copies start to slow down every editing operation done in Ardour. Everything becomes very sluggish.

It seems I need to go back to “Midi region copies are linked” to have a fast session and be able to use “Snapshot & switch to new version” .

Maybe Ardour should use a smarter “copy on write” method to duplicate only regions when they are modified in a session copy.

Anyway I can live with these small limitations now that I know why they are there. Thanks for helping me out.

1 Like

Just talking random thoughts out loud here: this corner case seems to stem from the fact that midi data is stored externally to the session file. The session has no other way of owning its own copy of midi than making duplicates of the external files.

If however midi data were to embedded inside the session, then the session would own it’s own copy of the data and there would be no risk of overwriting data of other session copies ever.

Or if all midi data in a session was stored in one file owned by the session then this category of problems would also go away.

Seems this is more about how the data is stored than if midi files are individual or linked.

This is good to know. Thanks for sharing.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.