Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Terribly slow CMS

Go to End

40 Posts   11638 Views


Community Member, 63 Posts

9 February 2010 at 11:57pm

Another performance tip if using Apache and you have access to the Apache Config files -

Put the main .htaccess info into the Apache config files.
Depending on which version of Apache this can be done in httpd.conf as a Directory
<Directory "install-directoy of Silvertripe">
Silverstripe htaccess content goes here

This is an improvement in Apache as the htaccess is now in memory and not being read each time a page is accessed.

It makes Silverstripe run that wee bit quicker.


Community Member, 79 Posts

10 February 2010 at 1:21am

Do you have any figures on this? I can't see it saving anything more than a few microseconds per request, especially when running under Linux where the .htaccess files are likely to already be cached in memory.

Not saying it won't help, but just wondering whether the cost/benefit makes it worthwhile doing.

-- Jason


Community Member, 90 Posts

10 February 2010 at 10:12am

Really good to see the performance problem has been solved.
Thanks AlexB...i am going to check my Assets mode...:P
Its really good to see lots people actually working for improving and providing suggestion for a better CMS.
So pleasure to be a part of the community:D


Community Member, 63 Posts

11 February 2010 at 12:18am

Hi Jason,

I set up a little test running 2 separate installs of SilverStripe v2.3.6. on Linux.
Both versions are the install of SilverStripe with nothing added. with mod_rewrite running via .htaccess with mod_rewrite running via httpd.conf

The difference between the 2 is I put both DocumentRoot .htaccess and the assets/.htaccess into the httpd.conf file.

There is a slight improvement in using httpd.conf tho it is almost negligible. Seams to sometimes shave off about 100 miliseconds.

Would it be a benefit to a site with heavy traffic?



Community Member, 79 Posts

11 February 2010 at 12:23am

Edited: 11/02/2010 12:24am

100 milliseconds is not insignificant - it's a tenth of a second. You could do a 100+ simple database lookups in that time.

I would not have thought that is how long it takes to load the file (think about how many files are loaded in one SS page request). Perhaps the time is involved in parsing and processing the file? Something to bear in mind when deploying websites in general. Thanks.

-- Jason

Billy Bob

Community Member, 9 Posts

11 February 2010 at 1:28am

Just a quick update.

The good news is:

1. There is NO bad news &
2. SilverStripe is running like a dream.

Cheers once again.


Community Member, 712 Posts

11 February 2010 at 7:27am

It is always better to use your .conf rather than .htaccess:

See the apache .htaccess tutorial:

"In general, you should never use .htaccess files unless you don't have access to the main server configuration file. There is, for example, a prevailing misconception that user authentication should always be done in .htaccess files. This is simply not the case. You can put user authentication configurations in the main server configuration, and this is, in fact, the preferred way to do things."

It goes on to explain why, for performance and security reasons.

Of course, it doesn't really matter for a lot of people, but it's an easy performance win (100ms is huge!).


Community Member, 17 Posts

16 April 2010 at 6:32am

another big props to Alex. Tried his tip on a new v2.4.0rc1 installation. My admin views were loading slow. Now, fast :)


Go to Top