Howdy guys. Sorry for the crosspost. Patch to speed up taglib.
Manuel Amador (Rudd-O)
rudd-o at rudd-o.com
Sat Oct 6 20:45:24 CEST 2007
Those little reads will still be on the page cache because TagLib doesn't
usually scan the entire file -- it only reads small snippets.
Let's test the patch first, see if it works. We're building speculation on
top of more speculation, when at least according to the relevant man page
those speculations are totally unfounded.
El Sáb 06 Oct 2007, Scott Wheeler escribió:
> Allan Sandfeld Jensen wrote:
> > On Friday 05 October 2007 17:32, Manuel Amador (Rudd-O) wrote:
> >> Here's a patch. Hope it's useful.
> >> I dunno how to make KMail not linewrap, so I'm attaching it and pasting
> >> it as well.
> >> This patch implements on posix systems the fadvise system call that
> >> makes the system not readahead mp3 while scanning for tags. It's absurd
> >> to introduce readahead to a problem that entails reading two or three 64
> >> K pages at most. Less I/O is good. right?
> > Depends. This might speed-up collection scanning, but it would also slow
> > down normal one file scan and play, because you are evicting pages that
> > is going to be reused by the decoder right after tag-reading. Maybe if
> > you remove the last DONTNEED advise, it will be performance-wise safer.
> I also suspect that it will slow down reading since there will be more
> blocking I/O roundtrips. I don't know if this at a system level is
> implemented as "only cache things a little" or "really grab the bytes
> from the spinning magnetic thing every time". If it's the latter, for
> this to not suck a lot TagLib would need to do its own internal
> readahead caching.
> Right now the I/O calls are built on the assumption that doing one
> little read and then another little read a little later is still fast.
> I'm in the process of backup / reinstall / blah on my Linux box, so I'll
> probably get around to testing this in a day or two (and this call isn't
> present on OS X, where I'm typing this).
> taglib-devel mailing list
> taglib-devel at kde.org
Manuel Amador (Rudd-O) <rudd-o at rudd-o.com>
Rudd-O.com - http://rudd-o.com/
GPG key ID 0xC8D28B92 at http://wwwkeys.pgp.net/
Q: What is green and lives in the ocean?
A: Moby Pickle.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/taglib-devel/attachments/20071006/18739685/attachment.pgp
More information about the taglib-devel