23486 Posts in 18995 Topics by 2878 members
|Go to End|
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.
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.
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...
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
11 February 2010 at 12:18am
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.
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?
11 February 2010 at 12:23am Last edited: 11 February 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.
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.
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!).
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|