[haiku-development] Re: Donating codes: APE reader

  • From: Ingo Weinhold <ingo_weinhold@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sun, 01 Jun 2008 05:14:13 +0200

On 2008-05-31 at 18:59:37 [+0200], SHINTA <shinta.0806@xxxxxxxxx> wrote:
> 
>  This code has two problems.
> 
>  One is taking long time in CAPEHeader::FindDescriptor(). 1 byte x 1
> mega times disk access seems to be slow, although this code worked well
> in ZETA.

Can you give some details, please. I just tested under VMware to fread() a 
ca. 1 MB file byte-wise, which took between 0.1 and 0.2 s. This is 
certainly not particularly fast, but not that bad either. When running the 
test on the host Linux it is only 20 - 30% faster.

At any rate using the API this way is definitely not a good idea. Reading 
64 byte chunks already speeds up the whole process by an order of magnitude.

CU, Ingo

Other related posts: