Jump to content

Processwire and "Time to first byte"


Torsten Baldes
 Share

Recommended Posts

Hi,

i noticed on my sites and also on other processwire sites, that the time to the first byte is quite long (> 500ms).

Is there a way to speed up this waiting time, without using plugins like ProCache?

i benchmarked some sites from the showcase and from Processwire weekly and nearly all of them perform bad at First Byte Time.

is this related to Processwire or just standard behaviour for php/cms sites?

Here are the tests:

First Byte Time - Grade F

URL: http://c-logistic.de/

Test: http://www.webpagetest.org/result/150601_J7_3992e9491b6acf72f73f10441880e6a2/

URL: http://von-bergh.de/

 

URL: http://www.orkork.de/

 

URL: http://www.dojofuckingyeah.de/

 

URL: http://www.schloss-marienburg.de/

 
 
First Byte Time - Grade C
 

URL: http://www.grupoolmos.com/

 

URL: http://www.pipistrello.ch/

 
  • Like 2
Link to comment
Share on other sites

The answer is quite simple.

flush();
ob_flush();

Use these as soon as you have parts of "final" markup, that you can send to the user. Sadly this needs to be in order, so most of the time it's more like:

"header" - flush - "content" - flush - "footer" - end

This speeds up every request.

Other options are caching and faster servers (and/or cdn). It doesn't necessarily need ProCache for fast caching. TemplateCache and MarkupCache are quite powerful, too, but they do require php to run (fast servers *hint*).

Link to comment
Share on other sites

Sites with A (and B) grade are almost certainly using ProCache. In real life it is really hard to get A grade without ProCache. And yes, some CMS/CMF are faster. The best results are achieved with SSD (for data and for mysql data), tested myself, almost double the speed...

Link to comment
Share on other sites

  • 2 weeks later...

The site is currently hosted on an utterly lazy shared webspace. Guess that alone makes a huge difference ;)

Also, caching is currently completely deactivated - and I have no senseful reason for that, mark it as "testing" ;) I'll activate it in the near future

Link to comment
Share on other sites

 Share

×
×
  • Create New...