Extremely poor performance with m4b audiobooks

When trying to retag some audiobooks in my collection, I noticed the poor performance with m4b audiobooks. Tagging works fine, but saving takes a lot of time.
A folder of about 100 audiobooks took several hours just to save.
The bigger the file is, the longer the save time.
Is there anything that can be done about this?

Many thanks, keep up the great work :slight_smile:

Been a while - in the meantime I got a new MacBookPro and am running Monterey instead of Big Sur now.

Still the problem persists.

Am I the only one affected? :face_with_raised_eyebrow:

Can you share one of the files with such bad performance privately via iCloud?

Same exact thing on windows pc. I'm not convinced it is an issue with file size. I thought it might be the tag content, using a plugin for audible. It happens to me on almost every m4b file I tag. I was trying to see if it could be re-created if I sent a file, but I'm struggling a bit, as when I delete the tag and then re-tag, it is really fast. Even after restarting mp3tag, the file seems to be fast again when I re-tag it. I'm struggling to give you some specific steps to re-create it.

For me if I even change the description from blank to state "test". it will take a few minutes while saving the tag. But when I try it again after restarting mp3tag it doesn't do it. It's quite strange. I will share a file.

Your description of the issue very much indicates that the issue is that the entire file needs to be rewritten.

In most formats, including MP4, the tags are near the beginning of the file, before the actual payload. If you write tags to the file and the newly written tags take more space then before the entire file needs to be rewritten. This is usually much slower than just rewriting part of the file containing the tags, especially on larger files and/or if the files are on a slow storage (e.g. a network share or slow external drive).

Your audiobooks likely contain the whole book in a single file and are hence probably not exactly small.

To mitigate the issue most tagging software (including MP3Tag) leaves some space (the so called padding) after the tags and before following data. So if you add only little data this free space can be used instead of rewriting the entire files. But this only helps so much, if you add more data the rewriting still happens.

Likewise when you delete some tags usually this just leads to some extra free space to avoid rewriting the file.

This all means that when you add many tags to the files (or if there is no or only small padding) you experience slow writing speed. If you do only small changes or just remove and later re-add tags the writing is much faster.

2 Likes