Version: 1.2.4 (using KDE KDE 3.4.1) Installed from: Debian testing/unstable Packages OS: Linux Changing the "Title" tag in a flac file takes about 20 seconds on an Athlon XP2200, this is quite slow... :-( Speeding it up would be great.
For any file, or just with specific ones? At the moment I only have one flac file. It has 20MB, and changing the track took about 8 seconds here (I have a Athon 1800+), both with amaroK and JuK. I agree It seems to be too much, but as I don't know anything about how tags work in FLAC files, I can't really tell. As taglib handles all the tagging work, I'm passing this bug to them.
Sorry, but that's just because FLAC's tagging format is especially silly. (They use the same format as Ogg Vorbis, which is even less appropriate given the file sizes.) Basically the tag is at the front of the file and there's no provision for "padding" as in ID3v2. So if you change the author and make it one character longer, you have to move the remaining 20 MB of the file back by one byte which is, well, slow.
this is not true. please google for FLAC__metadata_chain_sort_padding... regards, gunnar
Created attachment 14331 [details] flacfile.cpp patch for efficient flag tag updates Attached is a patch which solves this issue. Where possible a flac file's tags are edited in place by shrinking any padding block which follows immediately after the comment block. If the padding block is too small (or not present) then this efficient method is not possible, and therefore the file has to be completely rewritten. This patch will insert another padding frame to allow for efficient future small additions. With this patch, juk can bulk edit flac tags at approximately 10 per second. Without, it takes over 10 seconds to edit one file's tags. Flac file format reference: http://flac.sourceforge.net/format.html#format_overview
Created attachment 14332 [details] very small flacfile.h patch
Reopening for now until padding is implemented. Toby -- your patch wasn't complete. It just contained the one line change to the header.
There are two patches attached - you need them both.
Could this code (similar) be applied to TagLib::Ogg?
Simple answer: no The current ogg-packet/page access-layer doesn't support something like this.
Created attachment 27366 [details] flacfile.cpp diff
Created attachment 27367 [details] flacfile.h diff I have updated the patch to work with 1.5 - simple variable name change so i haven't really done anything. As before you need this and the above diffs. It speeds up the writes massively and is a good feature to include in the next release.
SVN commit 995518 by wheeler: Use flac padding. Updated patch from Toby Dickenson BUG:107659 M +76 -7 flacfile.cpp M +1 -0 flacfile.h WebSVN link: http://websvn.kde.org/?view=rev&revision=995518