The goal of this issue is to help users who have poor experience of Piwik by detecting when it happens and displaying a help notification to guide them in right direction.
Problem: Piwik loads stats slowly for many users when Browser trigger archiving is enabled in settings. It affects mostly
All Websitesdashboard, detect when stats take more than a few seconds to load and display inline notification suggesting to solve the issue.
Last 30 daysthen we should pre-process it anyway, see #6672
How often should the notification be displayed? if the user closes the notification, maybe it could be displayed again in one week. The notification should be displayed to all users but messaging should change for Super User to recommend them to change the settings or setup cron (for normal users it would recommend to contact the Piwik Administrator to let them know of the issue and suggest them to tweak Piwik).
Who is affected by issue?
Almost all users by default will experience this issue sooner rather than later. By default the automated cron is not setup and user has browser archiving enabled in piwik settings. by default we load Today, and All websites can also load the Last 30 days, so the user will request a lot of fresh data most of the time!
Maybe you have other ideas?
Two small notes:
I'm not sure what is default date selection but for sure having "yesterday" in general would be better default than "today".
Today we got again some user feedback of frustration at the slowness of the
All Websites dashboard, here it is:
This All Sites STILL does not work. Nine times no, once yes. PHP has got 512 MB RAM, no errors are shown … it’s kinda joke. This is from the beginning crippled. The old Piwik worked, since this new – broken by design!
In some way it's true that it's broken by design because we do not tell users if they don't look in the settings or the docs.
Because we all know the issue can be solved by setting up the cron, I've added a
Major tag to this issue and updated the description to describe a specific change we could make:
Detect when stats take more than a few seconds to load and display inline notification suggesting to solve the issue.
from forum feedback: http://forum.piwik.org/read.php?2,125969,page=1#msg-126260
I'd regard myself as a representative user. I can follow the install instructions, but they took me a lot longer than 5 minutes. I am not a Linux wiz. I may be mistaken, but I am pretty sure they don't conclude with set-up the cron for auto-archiving otherwise I would have tried or paid someone to help me. My suggestion is that you do add this setup to the instructions. I think it will provide a better experience to your users, and as far as I can tell, there is no downside.
Maybe we could also double check the wording in installer. Right now it says "setup the cron if you have a high traffic website" or so, instead we could make it clear that it's important for fast Piwik experience to setup the cron for most websites (except for very low traffic Piwik.)
FYI: not sure how this could be implemented... Could we hook into our ajax global queue, and/or the AngularJS http queue, to detect if any pending request is taking more than N ~ 15 seconds?
Here is something maybe relevant for this problem: for our UI tests we had to check whether all HTTP requests are finished. When all HTTP are received by the browser then only we can take a screenshot as we know everything is loaded. This wasn't working well in PhantomJS and this is why we had to use our global ajax queue and angular HTTP queue. See the magic code in the UI test helper code: https://github.com/piwik/piwik/blob/2.16.0-rc1/tests/lib/screenshot-testing/support/page-renderer.js#L503-L520