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

Date range longer than 1 year, should use the yearly reports instead of 12 months reports #4757

Closed
mattab opened this issue Feb 26, 2014 · 4 comments
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 Feb 26, 2014

Instead of using 12 months in year2006, year2007 etc. we should instead use the YEAR archive for this year. This would result in much faster date ranges for very long periods.

See this test: https://github.com/piwik/piwik/blob/master/tests/PHPUnit/Unit/Period/RangeTest.php#L600

See also related #3611

@mattab mattab added this to the 2.x - The Great Piwik 2.x Backlog milestone Jul 8, 2014
@mattab mattab removed the P: normal label Aug 3, 2014
@mattab
Copy link
Member Author

mattab commented Aug 23, 2014

see also #4768

@tsteur
Copy link
Member

tsteur commented Mar 18, 2015

Isn't this already done see that test in the issue and https://github.com/piwik/piwik/blob/2.11.0/core/Period/Range.php#L328-L341 ?

I also did one test manually and it used a year I think.

@mattab
Copy link
Member Author

mattab commented Mar 18, 2015

I also did one test manually and it used a year I think.

the test looks good, but to be sure could you try again and confirm 100% that it works, and close issue? thanks!

@mattab mattab modified the milestones: Piwik 2.13.0, Mid term Mar 18, 2015
@tsteur
Copy link
Member

tsteur commented Mar 18, 2015

When requesting eg 2011-12-08,2015-03-18 it does use a year for 2012, 2013 and 2014.
If today is 2015-03-18 it does also use the year for 2015

@tsteur tsteur closed this as completed Mar 18, 2015
@mattab mattab modified the milestones: Piwik 2.12.0, Piwik 2.13.0 Mar 22, 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