-2

My drupal site on the development machine loads the pages slow. A page takes between 1500ms and 2500ms. The same site in production on the internet loads pages quick.

Using development tools in drupal I can see that for a simple page with some text and a few custom queries the MySql queries takes about 40ms.

Using YSlow I can see that loading the doc takes more than 2 seconds, all the other components like images, js, css about 500ms.

Disabeling virus scanner makes it another 100ms faster.

I have tried to narrow down the problem but cannot find it. I still have about 1.5 seconds delay I cannot explain. My development environment is:

Windows 7 (64bit) Apache/2.2.21 (Win32) mod_fcgid/2.3.6 PHP 5.3.8 MySQL Server 5.5

I would like some advice as where to look for the cause of this problem.

Dawied
  • 101
  • 1

1 Answers1

1

The first thing I suspect is that youre not running a php opcode cacher.

Is CPU or memory really scarce? What's the hardware in the test machine btw?

Assuming there's no visible spike in cpu, nor scarce memory / heavy paging:

Is phpinfo() loading quickly? (stick <?php phpinfo(); ?> into a file called something like info.php and fetch it). If yes, your drupal might be trying to resolve the clients address, do a geoip lookup or something else which would explain the 1 second delay, and if other php scripts runs quickly then have fun finding the reason.

3molo
  • 4,330
  • 5
  • 32
  • 46
  • I do not use a php opcode cacher. – Dawied Feb 03 '13 at 22:31
  • I am also not using a php opcode cacher on my production site (not that I know of). The production site is on a Linux VPC. I could start using an accelerator but still I cannot explain the difference in load times between development and production. – Dawied Feb 03 '13 at 22:40
  • I can tell you now that using APC with PHP makes no (or very small) difference. There is still a wait of 1 to 1.5 seconds before the page loads. – Dawied Feb 04 '13 at 01:37
  • Thanks for your help so far. Unfortunately the question is closed for being off topic without motivation. – Dawied Feb 04 '13 at 15:16
  • So, Michael Hampton sir, please tell me why this question had to be closed? Just stating it is off topic is not very helpful. – Dawied Feb 04 '13 at 17:01