Announcement

  •  » Requests
  •  » Speeding up the image gallery

#16 2008-07-24 21:09:50

Jive Bunny
Member
2007-10-12
50

Re: Speeding up the image gallery

You can also cache files via .htaccess

# cache images and flash content etc for one year as a example
<FilesMatch ".(flv|gif|jpg|jpeg|png|ico|swf|css)$">
Header set Cache-Control "max-age=29030400"
</FilesMatch>

I wouldn't see any harm in caching the tpl files.

It isn't advisable to cache scripts for php or cgi etc, so do that at your own risk.

Offline

 

#17 2008-07-24 22:03:34

rvelices
Former Piwigo Team
2005-12-29
1960

Re: Speeding up the image gallery

carminejg3, jive bunny - do you have a website to share with us ?

Offline

 

#18 2008-07-24 22:18:47

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

Re: Speeding up the image gallery

carminejg3 wrote:

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.

With next version, a close rule is on going to be used, except for readiness improvement I chose this form:
body{ background-image: url('bgdesert.jpg'); background-repeat: repeat; }

So minimum white space everywhere.

8-)


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

Offline

 

#19 2008-07-24 22:19:02

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

Re: Speeding up the image gallery

rvelices wrote:

carminejg3, jive bunny - do you have a website to share with us ?

+1


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

Offline

 

#20 2008-07-24 23:36:37

saimon
Member
2006-12-04
184

Re: Speeding up the image gallery

I think it would be better to preserve spaces and break lines, for readility of the CSS, and to use a CSS compressor which can be used in a plugin, for example CompreSS (dotclear plugin): http://plugins.dotaddict.org/dc2/details/CompreSS
I agree on the other points, there are too much CSS files, which represent many request.

Yahoo gives good advives on websie optimization: http://developer.yahoo.com/performance/
they provides the Yslow extension (work with Firebug) to analyse the performances

another ressource (in french) for dotclear, but can be adapted to pwg : http://blog.chaosklub.com/index.php/pos … Dotclear-2

Last edited by saimon (2008-07-24 23:38:37)

Offline

 

#21 2008-07-25 15:35:22

Jive Bunny
Member
2007-10-12
50

Re: Speeding up the image gallery

VDigital wrote:

rvelices wrote:

carminejg3, jive bunny - do you have a website to share with us ?

+1

Yes, I do have one with it running at the moment. I've only just got it online the other day there.

I'm not willing to post a link at this time. However, I will send you a link to it in the future privately as it wouldn't be suitable to post it publicly, nor do I want it to be posted publicly on the forums. Atleast I am not willing to post the link because of minors using this website.

I will be using PWG in future for another website which will be made public, but the present site has the occasional nipple showing, and has suggestive sexual poses, and isn't  P*** by far.

It isn't fully fleshed out yet. I still need to deal with the theme to be cross browser compatable, and look identical which isn't the case at the moment. Its fine in IE7/Firefox with slight differences.

When I am happy to send you the link to it, I will :)

Last edited by Jive Bunny (2008-07-25 15:36:19)

Offline

 

#22 2008-07-25 16:00:11

Jive Bunny
Member
2007-10-12
50

Re: Speeding up the image gallery

Vdigital, I have sent you a email with link provided.

Offline

 

#23 2008-07-25 17:02:20

carminejg3
Member
2008-05-23
35

Re: Speeding up the image gallery

saimon,

My point with saving space is once you setup the gallery, you arent well most people aren't going to modify the styles.  So providing a lot of white space so a developer can read the file a few times, compared to the hundreds or thousands of people that will have to wait for it to load when vewing the site doesn't make sense to me. 

Maybe an option for the PWG group to do is combine most of the css files into one for each section.  And leave them readable, like you mentioned.  Then include a tip about shorten them to save size and download times once you finshed configuring the css file.  It's really crazy when you look at things in bytes.  A space here and there start to add up.

Look at googles homepage source.  The old yahoo page use to do that as well..  Just jam all the code next to each other but they were under 6k.

When I try and do things I think about the site visitor first... they're you money machine, more visitors more money.  So if you have great pictures people may wait, but most will not be left on the page by the time it loads.  So we need to have a good balance.

THEN AGAIN this is a picture gallery, so aslong as we get the main page to load, people will feel better and wait longer.  I also like the tip about stripping the extra data from the thumbs.

Keep up the great ideas

Offline

 

#24 2008-07-25 18:25:56

Jive Bunny
Member
2007-10-12
50

Re: Speeding up the image gallery

I made a favicon today both 16px x 16px, and 32px x 32px fully coloured.

The difference between filesize on both was 3kb, so I suggest people making their own keep to 16px x 16px.

A note about my htaccess post above.

If you intend on editing files keep the max age pretty short time wise for them filetypes. Images that wont be moved can be cached a hell of a lot longer.

The htaccess code above can be used many times for different filetypes so that you can adjust the max age accordingly for said filetypes.

Offline

 

#25 2008-07-25 19:30:11

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

Re: Speeding up the image gallery

Jive Bunny wrote:

Vdigital, I have sent you a email with link provided.

You said in your mail "I don't mind if you share it with the team, but please don't disclose the url in public, but I'm assuming you wouldn't have been keen on me posting a link to it anyway".
And I am going to share your link with the team.
8-)


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

Offline

 

#26 2008-07-25 22:31:16

saimon
Member
2006-12-04
184

Re: Speeding up the image gallery

just an example: the original css of my blog and the compressed version, 75% of the original size.
I think it's not necessary to try to reduced manually the size (and to reduce readility) as it is possible to do this with a plugin ...

Offline

 

#27 2008-07-25 22:36:44

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

Re: Speeding up the image gallery

VDigital wrote:

Jive Bunny wrote:

Vdigital, I have sent you a email with link provided.

You said in your mail "I don't mind if you share it with the team, but please don't disclose the url in public, but I'm assuming you wouldn't have been keen on me posting a link to it anyway".
And I am going to share your link with the team.
8-)

When we see your gallery as rich it is, we are obliged to do something to speed it up.
You did a real good job.

8-)


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

Offline

 

#28 2008-07-26 00:28:38

Jive Bunny
Member
2007-10-12
50

Re: Speeding up the image gallery

VDigital wrote:

VDigital wrote:

Jive Bunny wrote:

Vdigital, I have sent you a email with link provided.

You said in your mail "I don't mind if you share it with the team, but please don't disclose the url in public, but I'm assuming you wouldn't have been keen on me posting a link to it anyway".
And I am going to share your link with the team.
8-)

When we see your gallery as rich it is, we are obliged to do something to speed it up.
You did a real good job.

8-)

Thanks for the thumbs up. A few things still to tackle, but I'm happy with things in general.

FYI, The only optimisation I have made to it so far is stripping extra data from 7 galleries associated thumbnails, htaccess cache mentioned above and zlib compression. It will take time to cache fully. No other optimisations have been done so far, but I should be tackling that sometime over the next month when time permits.

Offline

 

#29 2008-08-02 18:05:00

Jive Bunny
Member
2007-10-12
50

Re: Speeding up the image gallery

Not had a lot of time lately to post due to teaching my son how to fish :)

Anyway, Last week I used a css tool to optimize all the css files associated with PWG including plugin css, and I didn't notice any significant difference in overall speed. However, I am on a fast connection.

I had generation time enabled which showed no difference for me at all, so I decided to stick with the original files for now as I had commented out some stuff like the login form(stuff I need time to get around to). It stripped all whitespace away, all comments easily.

It could make things faster for 56k users on a whole, but what I can tell you is that it saved 8kb overall on the main css files regarding yoga.

This is the program I used http://www.blumentals.net/csstool/ which saved doing it all manually. It made a css file that was around 200 lines into around fifty lines if my memory serves me correctly. It was around that  regarding the numbers involved.

Offline

 

#30 2008-08-02 18:30:52

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

Re: Speeding up the image gallery

Thanks I will try it on the new release...
Thanks.
8-)


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

Offline

 
  •  » Requests
  •  » Speeding up the image gallery

Board footer

Powered by FluxBB

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