"All Websites dashboard" should load fast even when tracking hundreds of websites! MultiSites
|Reported by:||matt||Owned by:|
|Priority:||critical||Milestone:||1.7 Piwik 1.7|
Description (last modified by matt)
Currently, the multi sites dashboard page render takes 6 API requests (ie. 6 mysql SELECTs) for each website displayed. If a Piwik install has 1000 registered websites, the page load will simply fail, because the php page would try and execute 6,000 queries which is not a good idea.
Instead, only one request should be made to select the 6 values necessary for each website. This query would therefore select 6,000 values at once which would be as fast as we can get with that many values.
This query would join the site, access and archive_* tables. See Piwik_Access::reloadAccess() and core/Archive/Array/IndexedBySite.php for the current behavior. I think the solution might be to have a new class in core/Archive/Array indexed by user?
Change History (45)
comment:7 Changed 4 years ago by matt (mattab)
- Milestone changed from 1 - Piwik 0.5.5 to 1 - Piwik 0.5.6
comment:10 Changed 4 years ago by vipsoft (robocoder)
- Summary changed from MultiSites plugin: improve performance to make it work on Piwik with hundreds of websites to MultiSites: improve performance to make it work on Piwik with hundreds of websites
comment:16 Changed 3 years ago by matt (mattab)
- Summary changed from MultiSites: improve performance to make it work on Piwik with hundreds of websites to MultiSites: All Websites dashboard slow when hundreds of websites
comment:36 Changed 2 years ago by matt (mattab)
- Milestone changed from 1.x - Piwik 1.x to 1.7 Piwik 1.7
- Type changed from Task to Bug
comment:39 Changed 2 years ago by capedfuzz (diosmosis)
- Resolution set to fixed
- Status changed from new to closed