13

I'm looking for tips from other Drupal developers to make Drupal faster when developing (specially Drupal 7)

Taking in consideration that during development you don't want cache, so you can see the result of changes in code php/css/js. (See some answers here to flush cache / disable cache permanently)

Googling for "drupal slow localhost" will give some tips... but I want yours :)

3

You can probably get further by changing how you work instead of making Drupal faster on page loads.

The main thing here is using Drush to do stuff like clearing the cache (Even when disabling the page cache, there is still dozens of different caches involved, for example for hook implementations), installing/re-installing modules and so on.

And of course, APC should be installed, yes. You could even think about using http://drupal.org/project/apc to store parts of the cache in APC. This will however conflict with drush (you can't clear the APC cache by using drush) and will require additionaly RAM.

  • 1
    Thanks, I'm aware of Drush. (and that's not the question) But anwyay in the case of "drush cc" I think it's faster the admin_menu module shortcut (clear caches + refresh in only 1 click) – corbacho Mar 25 '11 at 9:45
  • That won't be the case if your web interface is loading slowly. In that situation the time it takes to activate a feature (clear caches/refresh) may only take one click, but it might take many seconds to get to the activation screen due to slow loading by your web server. The advantage of drush is it is decoupled from this bottleneck. – David Csonka Feb 15 '12 at 14:15
3

Install and enable APC. As I tested in Drupal 7, this will make your local site faster.

3

The best tip you can use (this really change my life) is adding a line in your my.cnf file:

innodb_flush_log_at_trx_commit = 0

You can find this file in your wamp folder or if your on linux server: /etc/mysql/my.cnf

Regards

  • I hadn't dealt with innodb_flush_log_at_trx_commit until today, but changing it to 0 just changed the ETA for an import from 28+ hours to < 1 hour! You can find more details about the command on the MySQL website: dev.mysql.com/doc/refman/5.5/en/… – Matt V. Jun 26 '12 at 18:19
1

I updated this Drupal Tutorial with some of the solutions I found:

Speed up page loading time on localhost: http://drupal.org/node/961012

1

Setup and configure node.js module on localhost and see the magic.

There is nice tutorial on :-

Video - Node.js setup-Youtube.

Blog - node.js drupal integration tutorial

Drupal.org - Node.js integration Drupal.org

I have configured this on windows and it worked lightning fast :)

  • The question is about Drupal development environment. Nodejs can speed up things working as some type of cache, in front of Drupal, but I don't see how nodejs can help to make Drupal itself faster – corbacho Oct 12 '15 at 10:22
  • hmm, it can make things more real time, and pushes the data without requiring to reload the page, which indirectly reduces bootstrap calls. – echo Oct 12 '15 at 10:49
1

Thought I'd post my experience which may help future readers. I struggled with for over 24 months with a really slow Drupal 7.3x stack on an Ubuntu 15.04 desktop (I just couldn't be bothered to with more pain and just carried on!). Today, I took a stab at installing MySQL Workbench 6.1 and it now flies by! Unbelievable!! I hope any future readers will consider this first as none the suggestions offered really solved my issues. The machine I use is a fair decent spec (16g RAM/dual core/2TB/Dual-head etc), so buying/getting 'another computer', I don't believe is the true answer. In all, if you are running Drupal on a desktop then try the above Workbench install first. To date, I've found I need to run Workbench in the background (or on another screen), still my whole Drupal experience has now improved immensely. Maybe I have just been luck today? Anyway, hope this helps future readers.

0

I can't give a definitive reason as to why, but I've found that running a localhost webserver through a Linux virtual machine has resulted in a more responsive Drupal installation.

I can only speak for my own experience, though, so it might not necessarily be true for anybody else.

-2

Get a faster machine.

Not only are you running apache/php/mysql on it you are also running a GUI and a IDE, probably multiple web browsers, skype, itunes all of which compete for resources. Making you drupal install and your whole machine slow.

Alternatively, have a separate machine with the Drupal install on to help spread the load.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.