Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tips on speeding up Drupal site

We just implemented a drupal site. Performance of the site seems to be an issue. We enabled drupal caching, set up apache caching derivates. Repeated page visits are fast enough (coz CSS and JS are cached), but initial page visits are still a problem.

Drupal experts, could you offer us some pointers, on different techniques used to speed up drupal sites. (like DOs and DONOTs). Are there any other low hanging fruits?

(BTW, DB is not a problem here. That layer is fast enough. Problem seems to be in PHP/Drupal layer)

like image 885
Think Floyd Avatar asked Apr 02 '09 21:04

Think Floyd


2 Answers

Have you used any tools like YSlow or Firebug to determine what portions of the page load are actually taking up the most time? Also, consider using the Devel module's query monitoring to determine how much time is being taken running queries versus executing PHP code.

As others have noted, an opcode cache like APC can have a dramatic impact. The fact that second visits to the site are faster, though, hints at an issue with secondary files (images, JS, external JS that calls remote sites, etc).

like image 104
Eaton Avatar answered Oct 21 '22 01:10

Eaton


You mention CSS/JS being slow - have you turned on the 'bandwidth optimizations' for CSS and JS in /admin/settings/performance? It bundles all the CSS (or JS) into a single file - which can make a sizable difference if you have a large number of separate files (latency is a killer).

Using an opcode cache, like APC, can make a big difference in page performance as well, especially once you start piling on the modules. I can't imagine going back to developing PHP without using it.

like image 27
Sean McSomething Avatar answered Oct 21 '22 01:10

Sean McSomething