grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] File readahead buffering


From: Colin D Bennett
Subject: Re: [PATCH] File readahead buffering
Date: Tue, 22 Jul 2008 21:14:50 -0700

On Tue, 22 Jul 2008 17:44:53 -0400
Pavel Roskin <address@hidden> wrote:

> On Tue, 2008-07-22 at 12:06 -0700, Colin D Bennett wrote:
> 
> > I agree that TGA is not, in general, a great choice for an image
> > format (unless it is faster to load a large background image -- a
> > 1024x768 RGB PNG file may take more time to decompress than a TGA
> > image would take to load -- although perhaps an uncompressed PNG
> > file would be comparable in speed to load).  However, I have not
> > been able to load any PNG images that I have tried to use.
> > Something about the chunk type not being supported.
> 
> Strange.  It's working for me.  You may want to post that file to the
> list.

Actually I'm testing it now, and PNG images are working... I'll post an
update when I have finished testing.  Maybe the failures I experienced
in the past were due to an old version of GRUB.
 
> > If the buffering is not done in the file I/O layer, then the font
> > loading, theme file loading, image file loading, etc. will all need
> > to do their own buffering, which IMHO is more error prone and makes
> > those modules use more code to handle low level I/O stuff, which
> > detracts from their specific purpose.
> > 
> > Also, this is no small increase in speed, but from 10x to 100x
> > increase in performance for some cases where small sequential reads
> > are performed.
> 
> OK, then you may have a case.

FWIW, here are some results of timing the loading of the same 1024x768
image in TGA, PNG, and JPEG formats -- first without the file buffering
patch, and then with the file buffering patch:

(Loading times in seconds.)

                   TGA  PNG 0  PNG 100  JPEG q80  JPEG q100
                 -----  -----  -------  --------  ---------
   No buffering     17     9        12         1          7 
      Buffering      1     1         1         1          1

I see that PNG files load at least as fast as TGA files, so that is
great news.  It also seems to show the degree of benefit provided by
using buffered file reads.  These tests were done by using the
'tgatest', 'pngtest', and 'jpegtest' commands, and manually timing the
results (accuracy +/- one second or so).

Regards,
Colin

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]