Navigation Menu

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

"Show all sites" should first fetch sites, then decorate them with details #8031

Closed
AndersBillLinden opened this issue Jun 2, 2015 · 13 comments
Labels
c: Performance For when we could improve the performance / speed of Matomo. wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.

Comments

@AndersBillLinden
Copy link
Contributor

When I click "Show All Sites" in the top, the time it takes to produce a result page seems to grow linear with the number of sites. Having more than 150 sites, which is the case we actually have, can be enough to trigger a timeout, resulting in an error page.

I suggest that the multi sites plugin should initially fetch only site names so the list can be rendered as quickly as possible and then have client side script that will use ajax calls sequentially for each site to get number of visits, page accesses, revenue and graph.

The page will then first consist of a list of site names and then the user will see that information is automatically filled in until the webpage is totally populated with such information.

@mnapoli mnapoli added the c: Performance For when we could improve the performance / speed of Matomo. label Jun 3, 2015
@AndersBillLinden
Copy link
Contributor Author

I could start with this if noone else did.

@mattab
Copy link
Member

mattab commented Jun 7, 2015

Hi @AndersBillLinden
Thanks for the suggestion. The challenge is that, until we get the metric data, we do not know which websites will be displayed in the dashboard.
Example: Imagine you have 1,000 websites in Piwik. Only the 50 sites with most visits will be displayed by default in the dashboard. But when you first load the dashboard we do not know which 50 will be later displayed.

So I think it's not possible to make this change. Thoughts?

@AndersBillLinden
Copy link
Contributor Author

We can initially sort on site name instead of number of visits. The user can change the sort to the number of visits if he/she like. We can skip the pager and if the user clicks the column for number of visits, rows will rearrange as the user views the page. If the number of sites is low, I guess the current approach can be used.

@AndersBillLinden
Copy link
Contributor Author

We can always cache the order of the sites so that the initial sort order wll be the same as the one before. Then we can initially order by number of visits. We will visually indicate that a row is not yet updated.

@mattab
Copy link
Member

mattab commented Jun 7, 2015

We can initially sort on site name instead of number of visits.

we could not easily change the sort order here: it is important to sort on Visits by default to first display those most important websites.

@mattab mattab closed this as completed Jun 7, 2015
@mattab mattab added the wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it. label Jun 7, 2015
@AndersBillLinden
Copy link
Contributor Author

@mattab What about my other suggestion?

@AndersBillLinden
Copy link
Contributor Author

I suggest that we order by visits initially and also cache that order. The next time a user wants to see the listing, it will come up and sequentially update/reorder (without using a pager).

@mattab
Copy link
Member

mattab commented Jun 7, 2015

@AndersBillLinden How long does it take on your Piwik to load the all websites dashboard? Ideally it should be very fast eg. under 1 second and we wouldn't really need to make this change.

Btw if you can upgrade to 2.14.0-beta the All Websites is a bit faster there already.

@mattab
Copy link
Member

mattab commented Jun 7, 2015

We can always cache the order of the sites so that the initial sort order wll be the same as the one before. Then we can initially order by number of visits. We will visually indicate that a row is not yet updated.

It sounds possible but I'm not sure that we need this added complexity in the dashboard... Our goal is to make the dashboard render very fast in most cases and ideally we don't need to be smarty with displaying the website data.

Btw if the All Websites is very slow, we should display a notification to explain to users why (and suggest them to setup Archiving cron): see #6210

@AndersBillLinden
Copy link
Contributor Author

I use the latest git version and I get a timeout displaying 154 sites. Maybe the number of sql queries is the real thief in this drama.

@AndersBillLinden
Copy link
Contributor Author

We can be sure there is a need, but maybe as you say the complexity of the dashboard should not be added to.

@mattab
Copy link
Member

mattab commented Jun 8, 2015 via email

@AndersBillLinden
Copy link
Contributor Author

We have setup cron archiving and disabled browser archiving.
Still it takes a lot of time, seems like we are able to get a listing however.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Performance For when we could improve the performance / speed of Matomo. wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.
Projects
None yet
Development

No branches or pull requests

3 participants