Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Improving performance - Positive/Negative Impact
dscoduc
#1 Posted : Friday, 20 August 2010 4:51:05 PM(UTC)
Rank: Member

Joined: 20/08/2010(UTC)
Posts: 5

I was looking at the connections being made during a typical gallery request and noticed that some of the files weren't cached. Specifically I found that the files in gs/images and gs/styles are loaded each time the page loads. So I added a web.config file to both of those folders with the following syntax to enable caching:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<staticContent>
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="3.00:00:00" />
</staticContent>
</system.webServer>
</configuration>

Now when I watch the traffic the image files are only loaded once and each additional requests are cached... Does anyone know if this is going to cause any problems?

Also, to reduce the size of my daily log files I excluded a couple of key files and folders from logging to the IIS logs. Looking at the log files it is obvious that most of the requests for images and thumbnails are done using web handlers, which use GUIDS and not the actual album/image names, making auditing those requests pointless. So for normal auditing of incoming users would mainly be on the default.aspx file.

To accomplish this I added the following sections to the %windir%\system32\inetsrv\config\applicationhost.config file:

<location path="gs/images">
<system.webServer>
<httpLogging dontLog="true" />
</system.webServer>
</location>

<location path="gs/handler">
<system.webServer>
<httpLogging dontLog="true" />
</system.webServer>
</location>

<location path="gs/services">
<system.webServer>
<httpLogging dontLog="true" />
</system.webServer>
</location>

<location path="ComponentArtUploadProgress.axd">
<system.webServer>
<httpLogging dontLog="true" />
</system.webServer>
</location>

Now my logs mostly show connections for the Default.aspx file and little else. Anyone find this useful?

Chris
Roger Martin
#2 Posted : Saturday, 21 August 2010 12:17:45 AM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,300
Location: Fort Atkinson, WI

Thanks for the info about the caching. I'll have to read up on that, but my guess is that this would be a good addition to GSP, but I am not sure how much it will improve things.

I don't have time to look into it right now, but in the past when I have used Firebug to study the network traffic, the files in the images and styles directory *are* being cached. If I change a style sheet during development, I have to explicitly hit F5 or else I don't see the change (that is, I get the browser cached copy). Even the images served by the handler are being cached, which actually causes some confusion when you rotate images (the browser shows your un-rotated images rather than retrieving the new ones).
Roger Martin
Creator and Lead Developer of Gallery Server Pro
Rss Feed  Atom Feed
Users browsing this topic
Guest
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.