By MBM on
Is it normal for drupal to be so slow on local install? everytime i click on a link it will just sit there for around ten seconds saying "waiting for local host" before the link finally loads. Is there any way to fix this?
Is it normal for drupal to be so slow on local install? everytime i click on a link it will just sit there for around ten seconds saying "waiting for local host" before the link finally loads. Is there any way to fix this?
Comments
I have found it to be slow as
I have found it to be slow as well.
I found installing XAMPP, instead of installing the components individually, speeds things up significantly.
It is also a function of your computer hardware.
Also your PHP memory limit. See "Increase PHP memory limit" http://drupal.org/node/207036
Which operating system? Is anything else slow?
Hello MBM,
I use PHP, Apache, and MySQL to create local applications the way people traditional use Perl or Python or Visual Basic with Microsoft Access. Starting with Drupal 4, I build them as Drupal modules. There are hundreds, possibly thousands, of machines using my applications going all the way back to PHP 3. Speed is never a problem unless:
Windows Vista is so slow at everything that I now automatically throw Vista in the trash. XP, 2000, or Ubuntu, anything but Vista.
You have a firewall in place. Windows firewall is the worst because it only blocks useful stuff, not the bad stuff. Some (most) of the other local firewalls do stupid things. I use only firewalls in the router providing the Internet connection.
You use Internet Explorer. For some reason, Internet Explorer will wander off doing nothing for up to a minute. The only thing I can think of is that it calls home to tell Microsoft all about your Web browsing. For that reason, I no longer use Internet Explorer for anything.
You have your host definitions wrong. You can create a situation where the access should be local but the browser will go out to the Web looking for the site then timeout. (IE does this occasionally even when the host definitions are right.) You can also make mistakes in the Apache configuration where the same thing happens, you should be working locally but something slips through and goes out to the Internet looking for a site.
When I start a new install on a new machine or a new operating system, I work through a sequence.
1/ Install Apache, configure Apache and hosts file for the test site, then access the Web site. You should see the default Apache Web page.
2/ Install PHP then MySQL then phpMyAdmin. phpMyAdmin should display when PHP is working. You should be able to see the MySQL configuration information when MySQL is working.
3/ Install Drupal. You know that Apache, PHP, and MySQL are already working. Drupal 6 works beautifully on a new install except for PHP 5.3.0. For PHP 5.3.0, you turn some messages off.
petermoulding.com/web_architect
Using XP
Hey, thanks for the reply I'm using xp and Firefox. The windows firewall is off. I tried using internet explorer and its actually responding much faster than Firefox, so maybe it has something to do with my Firefox addons.
Firefox Firebug Javascript
If you have Firebug on and the page produces a lot of Javascript or the wrong type of Javascript error, you can get a long hang and wait minutes for a result. Go into Firebug and turn Javascript monitoring off for the site. I tried to pin down some of the errors when visiting drupal.org. If you visit the modules list, the long one, you can wait a couple of minutes for the full page when Javascript monitoring is on.
petermoulding.com/web_architect
Problem somewhat solved
I couldn't figure out exactly what is causing the slowdown, it has to be one of the extra addons, plugins or something i installed in Firefox. Anyway i tried using Firefox in safe mode and noticed that loading times were at least twice as fast as regular. So my solution was to create a new Firefox profile specifically for working with drupal. After creating the new profile start firefox in safe mode choose the new profile and select all the checkbox options.
Its still takes around 5-7 seconds to load a page but at least its bearable now
Installing the Alternative PHP Cache (APC) made it much faster
I have tried many things to speed up my localhost server, installing PHP APC helped a lot. Here is how to install it on Ubuntu (GNU/Linux):
Install apache2-threaded-dev and APC:
sudo apt-get install apache2-threaded-devsudo pecl install apcTo enable APC, insert
extension=apc.soin the php.ini file:
gksudo gedit /etc/php5/apache2/php.iniRestart the Apache web server:
sudo /etc/init.d/apache2 restartPlace a file called info.php in /var/www -- containing:
phpinfo();Visit http://localhost/info.php, and verify that APC is enabled.
On Servers
If its your local system, you might want to take a look at how much memory you have provided via php.ini , Also if its your local computer, the speed of site will depend on the your machine configuration, Processor speed, Ram, Hard drive, what softwares you are running on the hard drive etc.
I would suggest that you look at the services running on your comp, disable anything that is not required, close any unused programs and see if that improves performance.
-Ravi
From 56K Modem to 20Mb broadband
Hi Ravi,
Thanks for your suggestions, but I looked at that already, and it didn't really make much difference. But enabling APC really worked. The closest analogy I can think of is going from 56K Modem to 20Mb broadband Internet; No more waiting 20-30 seconds for no apparent reason... The pages just appear magically with hardly any delay, brilliant.