@hpvd opened this Issue on November 22nd 2013

Making the felt & objective speed of piwik sites faster
via using big pipe concept:

BigPipe allows speeding up page rendering times by loading the page in small parts called pagelets.
This allows browser to start rendering the page while the php server is still processing to finish the rest.
This transforms the traditional page rendering cycle into following steps:

1) Browser requests the page from server
2) Server quickly renders a page skeleton containing the <head> tags and a body with empty div elements which
act as containers to the pagelets. The HTTP connection to the browser stays open as the page is not yet finished.
3) Browser will start downloading the bigpipe.js file and after that it'll start rendering the page
4) The PHP server process is still executing and its building each pagelet at a time. Once a pagelet
has been completed it's results are sent to the browser inside a <script>BigPipe.onArrive(...)</script> tag.
5) Browser injects the html code received into the correct place. If the pagelet needs any CSS resources those are
also downloaded.
6) After all pagelets have been received the browser starts to load all external javascript files needed
by those pagelets.
7) After javascripts are downloaded browser executes all inline javascripts.

informations and an implementation for php sites

another example is the implementation for magento: https://github.com/sitewards/BigPipe

@mattab commented on November 28th 2013 Owner

Thanks for the suggestion!
but because Piwik is already built piece by piece using ajax, I think it's not really required to do this.. it wouldn't make it much faster as if Piwik was generating all content as one page.

@hpvd commented on November 28th 2013

There was an great article about this topic in the latest t3n Paper magazine.
contents: http://t3n.de/magazin/t3n-nr-34-die-100-wichtigsten-koepfe-im-netz/

They show some (unspecific) comparisons of pages

  • which already uses standard ajax and
  • after adding the big pipe aproach.
    The differences in speed were - depending on the used browser- between 20% and 50%. I think this may be worth to have a little futher look (in the future), don't you?

if you are a FB user:
these links were provided to see the difference on facebook:
with big pipe: http://t3n.me/15ZNr8K
without big pipe: http://t3n.me/1bYDBZd

Powered by GitHub Issue Mirror