dev builds
themes manual
device status forums
mailing lists
IRC bugs
dev guide

Rockbox mail archive

Subject: Re: A nasty inefficieny in file.c?

Re: A nasty inefficieny in file.c?

From: Jens Arnold <>
Date: 2006-07-14

On 14.07.2006, Jens Arnold wrote:

> On 14.07.2006, wrote:

>> Jens Arnold wrote:
>>> For this purpose, file.c caches up to one sector worth of
>>> data. "headbytes" is any new data that fits into the sector
>>> cache when it's already dirty.

>> That implies thst the file is being /written/ to disk? What's
>> being written when I'm just listening to music?

> Hmm, my description was a little imprecise. readwrite() is
> used for both reading and writing, ...

> So, if a file is read or written in single-byte calls,
> there'll be 1x one tail byte and 511x one head byte for each
> 512 bytes of data. Very inefficient.

Another thought:

Are you listening to mp3? Iirc Slasheri said that the id3
parser is one such example of inefficiency as it reads

Regards, Jens
Received on Fri Jul 14 08:15:56 2006

Page was last modified "Jan 10 2012" The Rockbox Crew