Jump to content

Achievo/Howto/Developers/Speed up Achievo: Difference between revisions

From NusaATK
Line 14: Line 14:
With the apache [http://httpd.apache.org/docs/2.0/mod/mod_expires.html expires] module it's possible to change the cache behaviour of files.
With the apache [http://httpd.apache.org/docs/2.0/mod/mod_expires.html expires] module it's possible to change the cache behaviour of files.


  <ifModule mod_expires.c>
   ExpiresActive on
   ExpiresActive on
 
   # cache common graphics for 3 days
   # cache common graphics for 3 days
   ExpiresByType image/jpg "access plus 3 days"
   ExpiresByType image/jpg "access plus 3 days"
   ExpiresByType image/gif "access plus 3 days"
   ExpiresByType image/gif "access plus 3 days"
   ExpiresByType image/jpeg "access plus 3 days"
   ExpiresByType image/jpeg "access plus 3 days"  
   ExpiresByType image/png "access plus 3 days"
   ExpiresByType image/png "access plus 3 days"
 
   # cache CSS for 24 hours
   # cache CSS for 24 hours
   ExpiresByType text/css "access plus 24 hours"
   ExpiresByType text/css "access plus 24 hours"
   # set the default to 24 hours
 
   ExpiresDefault "access plus 24 hours"
   # cache javascript for 24 hours
 
   ExpiresByType text/javascript "access plus 24 hours"
  ExpiresByType application/x-javascript "access plus 24 hours"
  ExpiresByType application/javascript "access plus 24 hours"
 
  </IfModule>


== Use apache headers module ==
== Use apache headers module ==

Revision as of 18:35, 1 December 2008

This page will describe some tricks to speed up Achievo. As of version 1.4 (not released yet) there are some performance updates done in Achievo it self.


Use gzip compression

In atkconf.inc you can add the following config:

$config_output_gzip = true;

Use apache deflate module

With the apache deflate module it is possible to compress the output of the files that are send to the client.

Use apache expires module

With the apache expires module it's possible to change the cache behaviour of files.

 <ifModule mod_expires.c>
 ExpiresActive on
 
 # cache common graphics for 3 days
 ExpiresByType image/jpg "access plus 3 days"
 ExpiresByType image/gif "access plus 3 days"
 ExpiresByType image/jpeg "access plus 3 days" 
 ExpiresByType image/png "access plus 3 days"
 
 # cache CSS for 24 hours
 ExpiresByType text/css "access plus 24 hours"
 
 # cache javascript for 24 hours
 ExpiresByType text/javascript "access plus 24 hours"  
 ExpiresByType application/x-javascript "access plus 24 hours"
 ExpiresByType application/javascript "access plus 24 hours"
 
 </IfModule>

Use apache headers module

With the apache headers module it's possible to change the expires headers of files.

 #set expires header to 2 days
 <FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
   Header set Cache-Control "max-age=172800, public"
 </FilesMatch>

Create selector nodes

If your nodes has multiple manytoone relations, make sure the destination node doesn't contain too many relations. If this is case, just make a simple selector node for it with only the fields needed to get a decent descriptor.