Mail Index


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

Re: [ApacheGallery] Patch to replace inline C code with native Perl



On Tue, Mar 11, 2003 at 08:26:55PM -0800, Jon McClintock wrote:
> Hello,
> 
> I've been using Apache::Gallery for about a month now, and I have to
> say, it's pretty cool. However, the inline C has been giving me no end
> of trouble (mostly related to the object files), so I rewrote it to use
> the Image::Magick module and be entirely Perl. It's a little slower on
> the image scaling, but it works much better for me. I've included my
> changes in the attached patch to the 0.5.1 source tree.

For what it's worth, I've had far more problems even getting Image::Magick
to install on any machine where I wasn't using either deb's or rpm's. Talk
about a PITA ;)

> Also included is some minor changes to have it put WIDTH and HEIGHT
> specifiers on all of the IMG tags. This makes the pages render better
> when they're loaded.
> 
> I'd also like to modify Apache::Gallery so that it blocks on resizing
> the individual images in a page, and not on the whole page itself.
> Blocking on sending the HTML for the page until all of the thumbnails
> have been generated causes problems with timeouts when you've got a
> large number of images in a directory. I think this can be solved by
> moving the image resizing code into portion of the handler that loads
> images from the cache. Are there any drawbacks to this approach that I'm
> not thinking about?

Yes, the reason why we initially put it in the index page was that it
only has to be done once. What you really are requesting from the
page is the already scaled image and not something that gets scaled on
the fly. And because of the way we use templates it's not really 
possible to spit out the HTML as soon as the image is generated.

As Andreas and Thomas also talks about it might be a good time to start
some discussion on how we want plugin-functionality to work. 

-- 
  Thomas Eibner <http://thomas.eibner.dk/> DnsZone <http://dnszone.org/>
  mod_pointer <http://stderr.net/mod_pointer> <http://photos.eibner.dk/>
  !(C)<http://copywrong.dk/>                  <http://apachegallery.dk/>
          Putting the HEST in .COM <http://www.hestdesign.com/>