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

Monthly archiving should use the smaller amount of weeks and days inside the month #3611

Closed
mattab opened this issue Dec 14, 2012 · 4 comments
Assignees
Labels
c: Performance For when we could improve the performance / speed of Matomo. Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Milestone

Comments

@mattab
Copy link
Member

mattab commented Dec 14, 2012

Currently, archiving a month in Piwik will sum the reports for all 30 days and sum all reports together. This is causing most of the php memory issues which start failing when summing all datatables for Pages URLs for a month for example. Instead, we should reuse the algorithm used to process date ranges, which select the minimum number of periods to use to process the enclosing period. So, a month would typically use 3 or 4 full weeks + the remaining ~5-10 days. This would result in up to 70% less datatables to select and sum! 

ie a month archiving would select 4 weeks archiving + 3 day archiving, or 3 weeks archiving + 10 days archiving, so either 7 or 13 archives, instead of 30...

See also related bug #4757

@mattab
Copy link
Member Author

mattab commented Dec 15, 2013

Perhaps this was fixed in your earlier fix to this algorithm?

@mattab
Copy link
Member Author

mattab commented Feb 26, 2014

See also related bug #4757

@mattab
Copy link
Member Author

mattab commented Mar 16, 2014

We decided, after investigating for a few hours, that It is non trivial to make the change. Let's postpone for now.

@mattab
Copy link
Member Author

mattab commented Mar 18, 2015

would be nice to try again for 2.13.0 as it would make huge UI speed improvement difference for all date range requests

@mattab mattab modified the milestones: Piwik 2.13.0, Mid term Mar 18, 2015
@tsteur tsteur closed this as completed Mar 31, 2015
@tsteur tsteur self-assigned this Mar 31, 2015
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. Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Projects
None yet
Development

No branches or pull requests

2 participants