[geeklog-devel] Geeklog Caching

Tom websitemaster at cogeco.net
Mon Oct 14 21:44:05 EDT 2013


Okay I have the article caching pretty much done.

It works the same way as for staticpage and blocks where you can set an
individual story to cache from 0 to X seconds before it is recreated (0 is
off which is the default setting).

I have 2 questions which applies to all 3 objects being cached (article,
staticpages, blocks). 

1) Do we want an always on cache option where the cache file is never
recreated unless the object is updated by the user. I can see it working
where the user enters a -1 (instead of a 0 to X) so the cache file is always
used.

2) Right now all cache times default to 0 (off). Do we want 3 config options
to allow the user to set some other default?

With tests on my windows system I found very little gain in caching
articles, staticpages, blocks that have little more than text in them
(hundreds of a second difference). Where you really see a savings is when
these objects have to do some processing like with embedded autotags, php,
etc. At this point how long you want to cache the object for before it is
recreated depends on what the data is and if it ever changes and how often.

Thoughts?

Tom


-----Original Message-----
From: geeklog-devel-bounces at lists.geeklog.net
[mailto:geeklog-devel-bounces at lists.geeklog.net] On Behalf Of Tom
Sent: October-13-13 10:03 AM
To: 'Geeklog Development'
Subject: Re: [geeklog-devel] Reducing the number of HTTP requests

>> colate fix_html.js, confirm.js, search.js into utilities.js: save 2
requests

Some of these are theme specific so there should be on glutilities.js and
one  modern_curve.js (or called gltheme or whatever).

-----Original Message-----
From: geeklog-devel-bounces at lists.geeklog.net
[mailto:geeklog-devel-bounces at lists.geeklog.net] On Behalf Of Niemans
Sent: October-13-13 9:49 AM
To: Geeklog Development
Subject: Re: [geeklog-devel] Reducing the number of HTTP requests

Some js-files are not exciting and should be discarded: common.js (only for
Admin), confirm.js (what?), search.js (can be done in css).
Some others are useful and have an odd name. Group them all in one file
called glUtilities.js.

Some blocks use images and the loading can de delayed.

Adding it up:

remove polls : save 2 requests
remove captcha: save 1 request
remove forum: save 2 requests
remove common.js: save 1 request
colate fix_html.js, confirm.js, search.js into utilities.js: save 2 requests

Total 8 requests saved.

Than use lazy-loading of images in blocks. Saves you > 10 requests on page
load. Well, in the case Dirk showed.

Wim

Op 13 okt. 2013, om 14:07 heeft Tom het volgende geschreven:

> Just to elaborate on  this a bit.
> 
> I did do a test run for combining all css to use the style.css.php (at 
> least in the Modern Curve theme) so css could be cached by using an 
> etag and speed things up a bit.
> 
> It worked fine except when there are images involved. With the image 
> paths being hardcoded in the css file and having those paths based on 
> the location of the original css file the image would never display 
> since the style.css.php file is located in the themes directory.
> 
> I never did see a way around this (unless the original css file is 
> written to have the style.css.php in a specific location)
> 
> Tom
> 
> -----Original Message-----
> From: geeklog-devel-bounces at lists.geeklog.net
> [mailto:geeklog-devel-bounces at lists.geeklog.net] On Behalf Of Tom
> Sent: October-12-13 7:40 PM
> To: 'Geeklog Development'
> Subject: Re: [geeklog-devel] Reducing the number of HTTP requests
> 
>>> I see a few obvious things (why are we loading the CSS for polls
> and captcha on the front page?)
> 
>       Basically for the plugins  to support Geeklog 1.8.2 and lower.  
> As of Geeklog 2.0.0 since we generate the entire page at the end we 
> can take into account if an autotag gets called and displays something 
> that requires the css file. With Geeklog 1.8.2 and lower we cannot 
> since the header is one of the first things generated. That being said 
> I think the latest version of the polls plugin now requires Geeklog 
> 2.0.0
so that could be switched.
> 
> 
>       Tom
> 
> 
> 
> 
> 
> -----Original Message-----
> From: geeklog-devel-bounces at lists.geeklog.net
> [mailto:geeklog-devel-bounces at lists.geeklog.net] On Behalf Of Dirk 
> Haun
> Sent: October-12-13 4:47 PM
> To: geeklog-devel at lists.geeklog.net
> Subject: [geeklog-devel] Reducing the number of HTTP requests
> 
> While hunting down some profile spammers, I noticed (not for the first
> time) that it does take quite a lot of HTTP requests to load the 
> Geeklog
homepage.
> 
> Below is a list of what it takes to load and display our homepage. 
> These are real numbers, grep'ed from the web server log file just now. 
> First column is a timestamp, followed by the URL and the number of 
> bytes
sent.
> 
> That's 34 HTTP requests. Note that it takes a full six seconds to send 
> everything (1 second to render the page, then 5 seconds until the last 
> resource has been requested). That's not exactly a great response 
> time, to put it mildly. This will get better on subsequent pages, when 
> the browser caches things. But 6 seconds is what it takes for a 
> first-time
visitor.
> 
> (The visitor came from a DSL line and the server wasn't busy at the
> time)
> 
> I see a few obvious things (why are we loading the CSS for polls and 
> captcha on the front page?) and a few potential fixes (merge 
> JavaScript files; maybe also some of the images).
> 
> Other ideas?
> 
> bye, Dirk
> 
> 
> --- snip ---
> 16:20:43 / (11012)
> 16:20:44 /layout/modern_curve/style.css.php?dir=ltr (59466)
> 16:20:45 /polls/style.css (1538)
> 16:20:45 /captcha/style.css (684)
> 16:20:45 /forum/forum/layout/forum.css (3256)
> 16:20:45 /layout/modern_curve/images/logo.png (16336)
> 16:20:45 /javascript/common.js (4244)
> 16:20:45 /forum/smilies.css.php (1828)
> 16:20:45 /javascript/jquery.min.js (92923)
> 16:20:45 /layout/modern_curve/javascript/fix_html.js (1435)
> 16:20:45 /layout/modern_curve/javascript/confirm.js (501)
> 16:20:46 /layout/modern_curve/javascript/search.js (1076)
> 16:20:47 /images/facebook-login-icon.png (845)
> 16:20:47 /images/twitter-login-icon.png (911)
> 16:20:47 /images/openid_login_icon.png (812)
> 16:20:47 /layout/modern_curve/images/print.png (756)
> 16:20:48 /images/topics/announcements.png (3847)
> 16:20:48 /images/topics/plugins.png (2717)
> 16:20:48 /images/buttons/download.png (6977)
> 16:20:48 /docs/images/de.png (694)
> 16:20:48 /docs/images/pl.png (631)
> 16:20:48 /docs/images/jp.png (641)
> 16:20:48 /docs/images/fr.png (675)
> 16:20:48 /docs/images/es.png (687)
> 16:20:48 /javascript/fix_tooltips.js (1596)
> 16:20:48 /javascript/login.js (1082)
> 16:20:48 /layout/modern_curve/images/css/bg.png (587)
> 16:20:48 /layout/modern_curve/images/css/bg_header.png (485)
> 16:20:48 /layout/modern_curve/images/css/menu_bg.png (466)
> 16:20:48 /layout/modern_curve/images/css/block_bg.png (577)
> 16:20:49 /layout/modern_curve/images/css/search-right.png (6671)
> 16:20:49 /images/buttons/feed.png (896)
> 16:20:49 /layout/modern_curve/images/button_help.png (532)
> 16:20:49 /layout/modern_curve/images/favicon.ico (1429)
> 
> 
> --
> http://www.themobilepresenter.com/
> 
> _______________________________________________
> geeklog-devel mailing list
> geeklog-devel at lists.geeklog.net
> http://eight.pairlist.net/mailman/listinfo/geeklog-devel
> 
> _______________________________________________
> geeklog-devel mailing list
> geeklog-devel at lists.geeklog.net
> http://eight.pairlist.net/mailman/listinfo/geeklog-devel
> 
> _______________________________________________
> geeklog-devel mailing list
> geeklog-devel at lists.geeklog.net
> http://eight.pairlist.net/mailman/listinfo/geeklog-devel
> 

_______________________________________________
geeklog-devel mailing list
geeklog-devel at lists.geeklog.net
http://eight.pairlist.net/mailman/listinfo/geeklog-devel

_______________________________________________
geeklog-devel mailing list
geeklog-devel at lists.geeklog.net
http://eight.pairlist.net/mailman/listinfo/geeklog-devel




More information about the geeklog-devel mailing list