- 2009-11-29: mongodb_watchdog module created by dereine, ported to D7 by me in about half an hour, and migrated in a larger MongoDB project by damz before the hour ended. Wow...
- 2009-07-13: 100% unit test coverage on Taxonews for both D6 and D7 versions
- 2009-02-03: the new Drupal-based site for the golden jubilee of the french "Ministère de la Culture", which OSInet helped build, is now online
- 2009-01-22: new API site for CCK à la api.drupal.org
Speeding up Drupal on Vista with Wampserver
The problem : Drupal awfully slow on Vista (and Seven) with Wampserver
For some time now, I'd been severiously annoyed by the (utter lack of) performance of Drupal 6 and 7 on my home PC, which happens to be running Microsoft Vista: considering I was used to getting page times around 200ms on a fractional Celeron with Apache 2.2 on a Linux server hosted comparatively far across the net from that same machine, I felt the 5 to 15 seconds response time per page on this local machine with a quad core and 3 GB RAM were really making me lose my time.
The solution
After some time spend googling around, I stumbled upon an incredibly simple tip, which made the 5 to 15 seconds per page drop down to around 1 second when logged in, and well below 500 ms when not logged in. It's incredible what ONE single character in a plain text file gets you under Vista :-)
UPDATE 2010-01-23: David Hogg tells us (see below) that this works for Windows Seven too
So, without further ado, here is this little gem : add a sharp character ('#') as the first character of the line containing: ::1 localhost in your c:\Windows\System32\drivers\etc\hosts and save it. If your machine is anything like mine, your Drupal response times should all of a sudden be divided by a factor between 5 and 10.
More detail
What this smallish change does is remove IPv6 localhost resolution from the hosts file. It is likely to cause other problematic situations if you do any IPv6 work, of course, and then you'll probably want to dig deeper into your network and/or Apache config.
Can't write to the hosts file ?
The mandatory access control feature of Windows Vista prevents normal programs from touching this file, even when you are logged in to an administrator account with all privileges. This means that your favorite text editor will load the file read-only and be unable to save your changes. To prevent this from happening, you must start the editor as Administrator. Unless you disabled it, the UAC window will ask you for confirmation, which you will have to give to your editor instance. After that, you will be able to edit the hosts file normally.





So will this work with XP?
Thanks for the above. The speed of my local wamp server for Drupal 6.x is depressing. Wonder if this sort of trick can be done for Windows xp?
Not applicable to XP
The XP hosts file does not contain any IPv6 information by default, so that tip cannot really apply.
Thanks!!!I changed"::1
Thanks!!!
I changed
"::1 localhost"to
"#::1 localhost"in
C:\Windows\System32\drivers\etc\hostsand it worked like a charm for me in Vista!!!
hello,there is no line ::1
hello,
there is no line ::1 localhost on my host file. furthermore, even if I start notepad with the admin rights, I still can't save the files.
Could you help me, please?
Regards,
Xavier
Is it really Vista ?
I'm afraid I don't have a clue: unless you (or some other person or software) tampered with your OS install, that line should be there. Also, starting an editor with admin rights (which doesn't just mean start it from an admin account) should allow you to save the
hostsfile (nothost, is it a typo ?) back.Maybe you have some so-called "security" software installed, which prevents you from administering your system ?
Thank you!
Wow, that makes an incredible difference!
This has just sped up my workflow dramatically and rescued my waning patience.
Vista and IPv6
You might also have a look at -> http://www.ipv6day.org/action.php?n=En.Configuration-WindowsVista
- cheers
Same problem here
My file has only one uncommented line
127.0.0.1 localhost
I added #:: to it for a small improvement
oh yeah...
you need to uncheck the "read-only" box in the properties of the file.
This shouldn't change anything
Commenting the normal 127.0.0.1 localhost entry shouldn't do you any good, quite the contrary.
The only point of this change, and only on Vista, is to disable a non-operational IPv6 resolution for localhost, but 127.0.0.1 is an IPv4 address.
Vista Drupal Slow
Thx man, I thought, what is this, so slow...
Works on Windows 7 too!
Installed the latest Acquia Drupal stack on my 64 bit windows 7 machine. Worked - but very slow response. Your one character fix worked like a charm! Thanks.