By maboleth on
Hi,
I'm building a site for my client and we both noticed that loading time is very slow when we enter the site address for the first time. It takes about 7 seconds just to start loading files and displaying the content. Like it has some delay.
However, after that period it's very fast and everything is ok. Once the page(s) is/are loaded, we can refresh them quickly and without any delay..... It will happen again though if we weren't active for like 10 minutes...
I tried with caching & compression & optimization enabled, but no luck - first-time delay is there no matter what I do.
Is this a problem with drupal, .htaccess file (I'm using the same I received with drupal) or server?
Thanks.
Comments
minimum cache lifetime?
do you have your minimum cache lifetime set to 10 minutes?
It's not cache or "expire"
It's not cache or "expire" feature... this is a delay in loading. I said 10 minutes just as approximate...
Anyone? I want to add that my
Anyone?
I want to add that my drupal installation serves two sites.... don't know if that makes any difference.
Drupal & the server
This is a problem inherent in Drupal. Instead of loading a fixed HTML page, it is making a series of queries to a database and creating the page from the results. Various things can be done to make Drupal more responsive. The first place to look is caching and optimization, which it sounds like you have done.
The next thing to check is the hosting. Drupal is not very quick on a shared hosting plan. You might want to run the site from a VPS. It's more pricey, but your site will load quicker.
A list of some of the Drupal sites I have designed and/or developed can be viewed at motioncity.com
Thanks everyone! Just as I
Thanks everyone!
Just as I feared... I think this is a serious drawback for drupal... it's not that waiting several seconds is the end of the world, but the user doesn't know if the site works at all! No loading icons or any signs that loading is in the process.
My drupal installation serves 2 sites. One is the main site with usual information and product catalog... it's relatively small and the other one is for e-shop (ubercart). I don't consider my site to be megalomanic and I know my client won't change the hosting.
Try Boost
Install Boost
http://drupal.org/project/boost
Follow the directions, it's worth it. To guarantee fast pages every time use the crawler as well.
http://drupal.org/node/363077
In short don't give up that easily. There are multiple tricks one can do on cheap hosting.
Also check out...
Two more things I'd check out...
1. If you have a whole lot of modules enabled (depending on which modules, "a lot" could mean anywhere from 50 to 150), that could be one of the causes of the slowness.
2. Once you have all your css/js compression + optimization and all the other basic performance stuff taken care of, if you still want a further performance boost, check out Boost. From what I hear it's pretty advanced to configure, but it does dramatically enhance the speed of your website. Basically, what it does is create cached versions of your pages (meaning once that page is first visited by a user, Boost creates a static copy so that on subsequent page loads there doesn't need to be any back-and-forth with the database).
What about the server
I have experienced a similar problem on my vps with low traffic. Regardless of which page I was viewing for the first time,The server had to wake up. And it actually did it with non-drupal stuff too. I took the simple solution - made a simple cron job requesting the front page every 30 minutes (that was my sleeping time).
Googling my problem revealed a lot of similar problems with other PHP franeworks but I found the solutions to technical.
I would also recommend installing The brilliant Boost module. Drupal is ressource heavy and Boost is a nice way to make fast and scalable sites.
For my code heavy sites on my
For my code heavy sites on my VPS, I loaded up FastCGI to keep the compiled code in memory so it didn't have to recompile again. Sped things up on first load by quite a bit.
Subscribing
trying to figure out molases.
On my sites things would be going great the all of a sudden site crawls.