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 Sat, Mar 22, 2003 at 10:49:00AM -0800, Jon McClintock wrote:
> On Wed, Mar 12, 2003 at 09:00:58PM -0800, Jon McClintock wrote:
> > This is a good point. I tried it out just now: on a directory with 117 
> > 1600x1200 images, the load spiked up to 4.25. It only took a couple of
> > minutes to produce the thumbnails for the whole directory, though. And, 
> > the client didn't time out while loading the page (in the current
> > version, the client times out several times while waiting for the HTML
> > to unblock on the resize).
> > 
> > Keep in mind, you'll only experience that load while it populates the
> > cache.
> > 
> > I'll test it a little more and send a patch out.
> 
> Ok, as promised, here is an updated version of my patch. In addition to
> my previous changes, it modifies Apache::Gallery to not resize the
> images until the image fetch. To appease those who objected, I added 
> a configuration variable "GalleryResizeOnPageFetch". If it's set, the
> original behavior is retained, and images are resized when the index
> page is generated. If it's not set, images aren't resized until they are
> requested specifically.

Okay, I'm almost 100% sure that this is not going to make it in. If we
want to allow for imagemagick to be used it would have to be a way so
you can choose which one you want. So, we need to figure out how we
want this to work. I'm proposing we make two new modules that plugs
into A::G from httpd.conf. I would suggest that we make two wrappers
called Apache::Gallery::Imlib2 and Apache::Gallery::ImageMagick. 
They would both have the same methods which would be wrappers around
how each library does the the resizing/superimposing etc. Both modules
would create the functions in a common namespace (so you can only use
one graphics library at a time). 

How does that sound Jon? Michael? Andreas? :)

-- 
  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/>