Skip Menu |

This queue is for tickets about the Imager CPAN distribution.

Report information
The Basics
Id: 69472
Status: open
Priority: 80/
Queue: Imager

People
Owner: Nobody in particular
Requestors: TONYC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 0.84
Fixed in: (no value)



Subject: BMP file reading inefficient in several ways:
Date: Fri, 15 Jul 2011 00:25:45 +1000
To: bug-Imager [...] rt.cpan.org
From: tonyc [...] cpan.org
A few ways: a) read_packed() calls readcb() word by word, rather then reading the whole block at once. b) read_bmp_pal() calls read_packed() for each palette entry, when it could just read the whole palette with a single read, and ideally i_addcolors() the whole palette at once. c) BI_RLE4 code should build an unpacked line buffer and pass that to i_ppal() instead of calling it one or two pixels at a time. d) similarly for BI_RLE8 e) we have similar code to skip the offset bytes in each reader which reads a byte at a time, this should be hoisted and read some number of bytes at a time. Ideally we need a buffering on the file and callback layers, but that's a separate issue.
On Thu Jul 14 10:26:12 2011, TONYC wrote: Show quoted text
> Ideally we need a buffering on the file and callback layers, but > that's a separate issue.
We now have buffering on all layers. But it's possible to switch it off, and reducing function calls won't hurt.