[ansel] Bad performance and a lot of GET requests
Michael J Rubinsky
mrubinsk at horde.org
Wed Apr 11 17:12:38 UTC 2012
Quoting Samuel Wolf <samuelwolf85 at googlemail.com>:
> 2012/4/11 Michael J Rubinsky <mrubinsk at horde.org>:
>>
>> Quoting Samuel Wolf <samuelwolf85 at googlemail.com>:
>>
>>> I upload ~ 13000 pictures in a lot of sub galleries.
>>>
>>> One gallery has 115 pictures, I can see 30 per page.
>>> All preview pictures (30) of the first site visible but my apache
>>> access log show a lot more GET requests.
>>>
>>> 10.23.1.88 - - [11/Apr/2012:17:42:40 +0200] "GET
>>> /horde4/ansel/img/mini.php?ajaxui=1&image=5558&t=Thumb&b=none
>>> HTTP/1.1" 200 7098
>>>
>>> "https://example.com/horde4/ansel/view.php?ajaxui=1&gallery=1&view=Gallery&havesearch=0&slug"
>>> "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.11 (KHTML, like
>>> Gecko) Ubuntu/10.04 Chromium/17.0.963.79 Chrome/17.0.963.79
>>> Safari/535.11"
>>
>>
>> This request is generating a "mini" preview icon - the really tiny (50x50?)
>> previews. From a gallery page, this could be coming from a number of places;
>> Off the top of my head - The geotag widget, the gallery tree widget, or the
>> similar images widget.
>
> You're right, it is the gallery tree widget.
> Is there a way to disable this complete?
Edit ansel/config/styles.php
>>
>>> But why?
>>
>>
>> How else would the browser request an image?
>>
>>
>>> $conf['images']['params']['vfsroot'] = '[...]/horde_data';
>>> $conf['images']['type'] = 'File';
>>> $conf['vfs']['src'] = 'sendfile';
>>
>>
>> If your server does, indeed, support sendfile, you will still see the above
>> request - as the sendfile is handled in the image generation script
>> (mini.php). If you want to completely bypass PHP processing for these image
>> requests, use a file-based VFS and the 'vfs-direct' option.
>>
>> Also, keep in mind that the first time an image is displayed, it's possible
>> the server needs to generate the preview image, which can lead to slow
>> performance. Once the view is generated, it is cached in the VFS.
>
> I know that, but the gallery tree widget pictures are not cached, right?
Sure they are. Every image generated by Ansel is cached in the VFS.
It's cached by a hash of a combination of things like image size,
backgroud color, style so that anywhere the same image parameters are
needed, the same image is used out of the VFS, regardless of where the
image is displayed in the UI.
--
mike
The Horde Project (www.horde.org)
mrubinsk at horde.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6096 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.horde.org/archives/ansel/attachments/20120411/a611e571/attachment.bin>
More information about the ansel
mailing list