Slow Time to First Byte (TTFB), because of translated language files?
Permalink
Hi!
I'm new to concrete5 and I ran into a stange problem. My webpage (http://www.maltaikeri.hu/teszt ) is on a shared host in Hungary, the staff is very helpfull, so we can managed to reduce the page load times significantly with memcache and some php settings, but there is a strange behavior: the first page load is till a little bit slow. After the first page is loaded, the others are super fast. At the same time, if I open a different browser on the same PC, the first page is slow again. It's important, that the first visited page could be any page on the site, not just the home page.
If you check my webpage, you can see a little bit large images and autonav, embedded youtube video, but the main problem is with the slow time to first byte.
To test this time to first byte issue, I made a Virtual PC with apache+php+mysql, installed concrete5 on it, and debugged apache using strace. Than I realised, that at least half of the lines in the log file about the translation (lines from the translated language file) like these:
737 0.000370 lseek(14, 45365, SEEK_SET) = 45365
737 0.000036 read(14, "%s (%s)\0%s File Properties\0%s Form Submission...
737 0.000278 lseek(14, 103441, SEEK_SET) = 103441
737 0.000035 read(14, "%s (%s)\0%s f\303\241jl jellemz\305\221i\0%s \3...
These are minimal times, but there are thousands of these lines... When the TTFB was for example 5 seconds, lseaks and reads were 2.8s.
I should take more tests to investigate this issue, but after I removed the translated language files, first page loaded much faster.
Maybe I'm wrong, because I'm not an expert, so it could be great, if someone also test these.
ps.: sorry for the long post (and for my bad english)
I'm new to concrete5 and I ran into a stange problem. My webpage (http://www.maltaikeri.hu/teszt ) is on a shared host in Hungary, the staff is very helpfull, so we can managed to reduce the page load times significantly with memcache and some php settings, but there is a strange behavior: the first page load is till a little bit slow. After the first page is loaded, the others are super fast. At the same time, if I open a different browser on the same PC, the first page is slow again. It's important, that the first visited page could be any page on the site, not just the home page.
If you check my webpage, you can see a little bit large images and autonav, embedded youtube video, but the main problem is with the slow time to first byte.
To test this time to first byte issue, I made a Virtual PC with apache+php+mysql, installed concrete5 on it, and debugged apache using strace. Than I realised, that at least half of the lines in the log file about the translation (lines from the translated language file) like these:
737 0.000370 lseek(14, 45365, SEEK_SET) = 45365
737 0.000036 read(14, "%s (%s)\0%s File Properties\0%s Form Submission...
737 0.000278 lseek(14, 103441, SEEK_SET) = 103441
737 0.000035 read(14, "%s (%s)\0%s f\303\241jl jellemz\305\221i\0%s \3...
These are minimal times, but there are thousands of these lines... When the TTFB was for example 5 seconds, lseaks and reads were 2.8s.
I should take more tests to investigate this issue, but after I removed the translated language files, first page loaded much faster.
Maybe I'm wrong, because I'm not an expert, so it could be great, if someone also test these.
ps.: sorry for the long post (and for my bad english)
Thanks jmonroe!
As I mentioned, I removed the language files, so I think that's the reason why the first page was loading faster. Now I copied the language files back. Could you please check the site again, because now it takes 5-6sec to get the first bytes from the server.
As I mentioned, I removed the language files, so I think that's the reason why the first page was loading faster. Now I copied the language files back. Could you please check the site again, because now it takes 5-6sec to get the first bytes from the server.
Nice work.