A
A
Airat Kadyrmaev2014-05-22 10:50:33
MySQL
Airat Kadyrmaev, 2014-05-22 10:50:33

Why is the page loading speed on the subdomain slower than on the main one?

The question is this - we do all the improvements, optimization before putting it on the site on a subdomain. Recently they made an optimization in order to reduce the load on the database and increase the download speed, and of course they did it on a subdomain. As a result, the load has decreased, but the page loading speed of the site is not, and in comparison with the main domain, the page loading speed on the subdomain is slightly higher.
The indicators are - Loading time Average speed
Main domain - 0.84 sec 117.42 Kb / sec
Subdomain - 1.11 sec 93.09 Kb / sec
What we did in terms of optimization: before, many queries were performed to get the name and avatar for each user that is displayed on the page. We have grouped these requests. As a result, the number of queries to the database has decreased.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
maxaon, 2014-05-22
@maxaon

In chrome, open the developer console and look in the network tab for details on what takes time. If it is connected only with a subdomain, then you will see the time for a dns request. But it is unlikely that dns requests are cached and time should not be spent on them after the first request, unless the ttl of the zone is set extremely small.

P
Puma Thailand, 2014-05-22
@opium

It is logical that your grouped query is simply taking longer.

W
WooDFox, 2014-05-22
@WooDFox

Measure the page generation time in the old and new versions. You can also measure the execution and processing of the request / group of requests directly and draw a conclusion. Then you can look further)
Measurement can be done like this

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question