I hope someone can help me with this Drupal 7 issue. I noticed that loading time is very slow when I enter the site address for the \"first time\". It takes about 20 (average) s
This is (most likely) because of the Drupal Cron tasks that are run every few hours/days (depending on settings). Drupal then executes all the queued cron jobs.. which can take a long time.
Have a look at this drupal.stackoverflow page.
e: Also, this tweak may help, but I haven't tried this myself: http://drupal.org/node/1576686
Turn off the Update Manager module on Production. When Cron runs, it will check for updates which will take time. Save time by only enabling this module on development sites (Dev, Staging, etc.). There's no need for Production to be spending time on this.
Take a look at what you have in your website's head section. If there are lots of @import statements in there then the problem most likely in frontend rather than backend.
Drupal uses a lot of .css and .js files by default. Browser can start drawing the page you request only after all .css and .js files from head section are got downloaded.
The problem with @import is that your browser can download just a single css file at a time. It is different case with tag. Css files can be downloaded in parallel in this case which means faster.
The second time you visit website css and js files are loaded from browser cache and this explaines why pages load faster.
Suggested workaround: Go to admin/settings/performance enable css and js aggregation.
I know this is an old question, but here is my solution. This happens to sites that are not generating much traffic and the site application pool on the server automatically shuts itself down after a specified period of time (I believe the default is 20 minutes). Thus, the first person that hits the website after this period of time will have to wait for the application pool to restart and that can take some time on php sites. This also applies for corn jobs. The core corn job is set to run every "n" minitues, but it can only run when someone hits the site. So, the first person hitting the site after the set interval for corn will have to wait for the corn job to run. So, for a production site, you should diable the core corn jobs and run them manually or use an external service to run corn (passing the corn's external url). The best solution is to use a free external service like Uptime Robot to hit your site every 5-10 minutes, thus keeping the connection alive.