Howdy guys. Sorry for the crosspost. Patch to speed up taglib.

Manuel Amador (Rudd-O) rudd-o at rudd-o.com
Sun Oct 7 00:17:52 CEST 2007


Well, that's the point -- even better then!  What are the chances that you 
need one of the 16000 files that thrashed the cache after a collection scan?  
Nothing should be cached by the OS until the file is actually going to be 
played, and unless there is heavy I/O or the caches are thrashed, the decoder 
isn't going to take more than 10 ms to fill the read buffer.

The patch is probably going to help collection scan speeds a bit, but the most 
noticeable effect will be that slow computers will actually be *usable* 
*during and after* collection scans, because there will be less disk I/O, 
working set and cache thrashing during and after the scan.

That's why the DONTNEED hint is there -- to tell Linux (and other 
POSIX-compatible OSes) that the file TagLib is reading will not be required 
to be held in cache because it is extremely unlikely that it'll be played 
right after scanning it.  And if the decoder thread actually falls into that 
unlikelihood, it will still be cached and readahead regularly because a 
SEPARATE fd will be opened to fetch data from the file.

We're no better off discussing this subject until the patch has been tested by 
someone, and the test should be done with an unprimed cache first (there's a 
knob in proc to do that).  I'd volunteer, but my build system is broken (a 
mess of Gutsy and Feisty packages will do that to ya).

El Sáb 06 Oct 2007, Allan Sandfeld Jensen escribió:
> On Saturday 06 October 2007 20:43, Manuel Amador (Rudd-O) wrote:
> > No, it won't slow down file play, because the DONTNEED hint only applies
> > to the file descriptor owned by TagLib.  If some other process holds
> > another file descriptor of the same file open, DONTNEED has no effect.
>
> There is no other thread, the decoder hasn't opened its file descriptor
> yet.
>
> `Allan
> _______________________________________________
> taglib-devel mailing list
> taglib-devel at kde.org
> https://mail.kde.org/mailman/listinfo/taglib-devel



-- 

	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/

A visit to a strange place will bring fresh work.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/taglib-devel/attachments/20071006/afb022a4/attachment.pgp 


More information about the taglib-devel mailing list