Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Making the felt & objective speed of piwik faster #4333

Open
hpvd opened this issue Nov 22, 2013 · 2 comments
Open

Making the felt & objective speed of piwik faster #4333

hpvd opened this issue Nov 22, 2013 · 2 comments
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.

Comments

@hpvd
Copy link

hpvd commented Nov 22, 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
e.g.
https://github.com/garo/bigpipe

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

@mattab
Copy link
Member

mattab commented Nov 28, 2013

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
Copy link
Author

hpvd commented Nov 28, 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

@hpvd hpvd added this to the Future releases milestone Jul 8, 2014
@mattab mattab modified the milestones: Long term, Mid term Dec 23, 2015
@mattab mattab modified the milestones: Long term, Mid term Dec 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Projects
None yet
Development

No branches or pull requests

2 participants