Speeding up CMSMS

Do something cool with CMS? Show us ...
This board is for 'Answers', and the discussion of answers... Not for questions.
Ziggywigged
Power Poster
Power Poster
Posts: 424
Joined: Sat Feb 02, 2008 12:42 am

Re: Speeding up CMSMS

Post by Ziggywigged »

calguy, when will you make this available?
Take a penny, leave a penny.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Speeding up CMSMS

Post by calguy1000 »

oh man, I should have bet money on this, I should have bet money :)

anyways

we're currently debugging issues related to some stupid browsers developed by international conglomerates that make a billion or more a day in revenues not supporting standards properly.

When this is done, I'll commit everything into svn.

Then I'll get started on some other, more complex issues like being able to specify variables for use in the tltie tag from the html body, etc, etc.

and if all of that goes well, and we can organize well enough, there may be (just maybe) be a 1.4 release.

And if this happens, and if some people can actually learn to contribute instead of being anti-social, we'd encourage some actual diffs against current svn to maybe take care of a few other inefficiencies, or implement a few other things that 'we just haven't noticed or taken care of because we're too busy fixing bugs or implementing features or having real lives'.... 
Last edited by calguy1000 on Mon Jun 09, 2008 11:56 pm, edited 1 time in total.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
faglork

Re: Speeding up CMSMS

Post by faglork »

calguy1000 wrote: I had an idea last night about speeding up stylesheets.

The problem exists that stylesheets were not getting cached in the browser... and this was due to a lack of understanding of how the cache stuff worked wrt http headers.

So I did some research and think I finally understand it, and I began working on a solution.

a) I modified the {stylesheet} tag to output seperate links to each stylesheet by cssid and to do database lookups
    to convert stylesheet name to id where necessary.
b) I modified the stylesheet.php to tread a cache file (tmp/cache/csshash.dat) which contains an md5sum of the
    css in the stylesheet and a stylesheet id as a key.
    - if the key does not exist for a particular stylesheet id, then the stylesheet is read, output, and the
      md5sum cache updated.  I then output the new md5sum and a last-modified date.
    - if the key does exist, and the hash matches that supplied by the browser, then an "HTTP/1.1 304 Not Modified"
      result is returned.

Preliminary results indicate a dramatic performance improvement because stylesheets can now be cached on the browser.
[..]
A lot of effort just to stick to dynamic stylesheets ... I will still prefer a "real" static CSS. The reason?
With a "real" CSS you can work *much* faster: You simply install the Web Developer Extension for Firefox, and you can work on your CSS in *realtime* - your screen updates as you type along - then you just save your modified CSS and upload via FTP and you're done.

Just my 2 cents,
Alex
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Speeding up CMSMS

Post by calguy1000 »

A lot of effort just to stick to dynamic stylesheets ... I will still prefer a "real" static CSS. The reason?
With a "real" CSS you can work *much* faster: You simply install the Web Developer Extension for Firefox, and you can work on your CSS in *realtime* - your screen updates as you type along - then you just save your modified CSS and upload via FTP and you're done.
a) I want dynamic stylesheets, because later I'm thinking of applying smarty to the stylesheets, so dynamic functionality is definitely needed for that.
b) have you checked out the 'Template Externalizer' module.  it allows you to play with your page templates and stylesheets via ftp.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Pierre M.

Re: Speeding up CMSMS

Post by Pierre M. »

So, If I understand correctly, in-browsers-caching of CSS is improving, hence CMSms speed is improved, while CMSms CSS management is kept compatible with Template Externalizer and on the road to be better with Smarty integration. Yeah ! Thank you Calguy1000.

@Alex : I'm sure the webserver under CMSms can render such URLs almost static by tuning headers/cache/expire :
href="http://xyz.fr/folders/cmsms-1.3/stylesh ... ype=screen"
According to the content-type (CSS) the webserver can put >15 minutes expiry time for http 304.

Pierre M.
rugby
New Member
New Member
Posts: 2
Joined: Wed May 27, 2009 11:04 am

Re: Speeding up CMSMS

Post by rugby »

There is one simple thing you can do to speed up CMS Made Simple - insert this:

Code: Select all

session_cache_limiter('none');
at the top of your index.php.

It will tell PHP not to send no-cache header, thus allowing to cache the page by your browser.
Pierre M.

Re: Speeding up CMSMS

Post by Pierre M. »

It may prevent the sending of "no-cache", but does it work well with CMSms Expires and eTags ?
(I'm not a PHP programmer)

Pierre M.
Glaukas
New Member
New Member
Posts: 2
Joined: Tue Jan 11, 2011 2:04 pm

Re: Speeding up CMSMS

Post by Glaukas »

thanks a lot guys!
User avatar
Gregor
Power Poster
Power Poster
Posts: 1874
Joined: Thu Mar 23, 2006 9:25 am

Re: Speeding up CMSMS

Post by Gregor »

I use Yslow, a Firefox plugin to see my side performance. Besides that it gives you an idea of the performance, it also gives suggestion for improvement.

Gregor
Post Reply

Return to “Tips and Tricks”