Announcement

  •  » Requests
  •  » Speeding up the image gallery

#1 2008-06-12 22:19:07

carminejg3
Member
2008-05-23
35

Speeding up the image gallery

Hi Everyone, I'm really excited at teh boost In traffic I hope to gain by using phpwebgallery.  In addition, I would like to find out more about the web services, since Im a big believer in self site promotion and using images around my site should boost the traffic to the gallery.

To help people speed up their sites i wanted to include one of my favorite tools. 

It shows you how your files are downloaded via a broswer, and I focus on limiting HTTPD request.  Since everyone is a connection between server and client and this slows down things.



http://www.websiteoptimization.com/services/analyze/

Offline

 

#2 2008-06-12 22:31:20

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13541

Re: Speeding up the image gallery

Thanks for this tool. I've tested it against the index page of phpwebgallery.net demo page. Of course what weights the most are the images (photo galleries are full of them) but I've also realized that we had nearly 30KB of CSS file (and I find it huge).

Offline

 

#3 2008-06-12 22:52:59

VDigital
Former Piwigo Team
Paris (FR)
2005-05-04
17680

Re: Speeding up the image gallery

We know the css point, I've planned as an exercice to reduce css for next release.
8-)


Piwigo.com: Start and run your own photo gallery. Signup and get 30 days to try for free, no commitment.
8-)

Offline

 

#4 2008-06-13 21:31:15

carminejg3
Member
2008-05-23
35

Re: Speeding up the image gallery

lol... i was looking into the css as well...  i feel once you break 7-8k your almost better using tables.

also I think you have a lot of flexibility which causes alot of the css files to become delicates.  I try and still design my pages for dialup since most the world is on that. 

And yes having an image gallery with 15-30 3k thumbs, or worse 15-30, 50/75k pics doesnt help much lol..

Offline

 

#5 2008-06-16 13:26:05

Jive Bunny
Member
2007-10-12
50

Re: Speeding up the image gallery

carminejg3 wrote:

And yes having an image gallery with 15-30 3k thumbs, or worse 15-30, 50/75k pics doesnt help much lol..

Regarding thumbnails, you can use a optimizer that strips extra data that is held within the thumbs without impairing the quality of the thumb images. A 3k thumbnail becomes a 2k thumbnail for example.

The same thing can be done with the high resolution images, but isn't advisable if you wish to use the extra data on your gallery like camera used etc. Roughly 5MB of images( around 50 in total) you can save around 100kb with removing the extra data.

Offline

 

#6 2008-06-20 07:07:38

rvelices
Piwigo Team
2005-12-29
1960

Re: Speeding up the image gallery

regarding the css -  i have always tried to simplify it by reducing the number of rules but it's not obvious

- one other thing I made on my site is put together most of the css into one single file - the browser does not start rendering until all css have been loaded and there are usually maximum 2 pending http requests per server - so it takes a long time ...

Offline

 

#7 2008-06-20 09:45:15

VDigital
Former Piwigo Team
Paris (FR)
2005-05-04
17680

Re: Speeding up the image gallery

rvelices,

I remake all our conception of css for next release.

In one hand, Admin css and gallery css are no longer common at all (except on template-common).
In an another hand, a lot of css order are going to be optimized.

In final, I will try to limit each public page to 3 light css files where I can.

8-)


Piwigo.com: Start and run your own photo gallery. Signup and get 30 days to try for free, no commitment.
8-)

Offline

 

#8 2008-06-20 09:45:48

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13541

Re: Speeding up the image gallery

rvelices wrote:

one other thing I made on my site is put together most of the css into one single file - the browser does not start rendering until all css have been loaded and there are usually maximum 2 pending http requests per server - so it takes a long time ...

Don't you think we should have a single CSS file. I think we already have talked about this point, but considering performances is also important. In addition, I would say that it makes things a lot simpler when you come to customization.

Offline

 

#9 2008-06-20 12:01:45

VDigital
Former Piwigo Team
Paris (FR)
2005-05-04
17680

Re: Speeding up the image gallery

z0rglub wrote:

rvelices wrote:

one other thing I made on my site is put together most of the css into one single file - the browser does not start rendering until all css have been loaded and there are usually maximum 2 pending http requests per server - so it takes a long time ...

Don't you think we should have a single CSS file. I think we already have talked about this point, but considering performances is also important. In addition, I would say that it makes things a lot simpler when you come to customization.

I agree.


Piwigo.com: Start and run your own photo gallery. Signup and get 30 days to try for free, no commitment.
8-)

Offline

 

#10 2008-06-20 14:42:21

rvelices
Piwigo Team
2005-12-29
1960

Re: Speeding up the image gallery

z0rglub wrote:

Don't you think we should have a single CSS file. I think we already have talked about this point, but considering performances is also important. In addition, I would say that it makes things a lot simpler when you come to customization.

Yes but it will be a mess soon given the size and number of rules inside. Chrisaga did a great job in splitting them by "function".

Offline

 

#11 2008-06-21 10:51:21

VDigital
Former Piwigo Team
Paris (FR)
2005-05-04
17680

Re: Speeding up the image gallery

Yeh, I agree and it takes time to review each statement.
I reduced a lot in admin but I need more and more time to make the complete review.
I will maintain Chris logic every where I can.
But sometimes breaking his logic has been a good point on performance side.
8-)


Piwigo.com: Start and run your own photo gallery. Signup and get 30 days to try for free, no commitment.
8-)

Offline

 

#12 2008-06-21 21:15:07

Jive Bunny
Member
2007-10-12
50

Re: Speeding up the image gallery

VDigital wrote:

Yeh, I agree and it takes time to review each statement.
I reduced a lot in admin but I need more and more time to make the complete review.
I will maintain Chris logic every where I can.
But sometimes breaking his logic has been a good point on performance side.
8-)

I'm not sure if this is anything really worth thinking about but when I have looked at the internals of some plugins, I noticed a few files had extra whitespace that may impede overall speed of the gallery system.

Offline

 

#13 2008-06-21 21:34:28

VDigital
Former Piwigo Team
Paris (FR)
2005-05-04
17680

Re: Speeding up the image gallery

Jive Bunny, good point! Thanks.
Need to be a global recommendation.

8-)


Piwigo.com: Start and run your own photo gallery. Signup and get 30 days to try for free, no commitment.
8-)

Offline

 

#14 2008-07-10 09:45:33

carminejg3
Member
2008-05-23
35

Re: Speeding up the image gallery

Also to save space in the css file try to put common rules like this:  Its harder to read BUT it saves a lot of white space and white space adds up.

body{background-image:url('bgdesert.jpg');background-repeat: repeat}

I also noticed that you have added a lot of flexiblitly in the css's and that is where it gets builky.  Maybe move the main Css file to the theme, since most sites will use a theme to run their gallery.  This way there arent any dup's with names.

But keep up the good work.

Offline

 

#15 2008-07-24 19:57:12

carminejg3
Member
2008-05-23
35

Re: Speeding up the image gallery

I focus on a lot of site optimization on my site and everyone has a good point.  As an end user, I would prefer to know there is one file to customize.

This way We dont have to hunt through 5 files, even thought I understand why it was put out into 5 files with each browser handling things differently these days.

I'm also curious how many of these CSS style sheets overlap each other, by using one file for the live gallery may help increase some speed there.

Also someone brought up the HTTP-request which is really the silent killer in websites.

If i have 50 external css inculde files at 1k each and 1 80k css file the 80k file will load faster most of the time Since a server handles 2 http request at a time.

So to sum it up, you can improve speed by decreasing http-request and allowing images to be cached, such as navigation images and all.  I will post what we use on our linux version in apache 2. 

Another advantage is the css file will be cached as well so that it will save load time.

Offline

 
  •  » Requests
  •  » Speeding up the image gallery

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2022 · Contact