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

Don't force using day period for sparkline when comparing to ensure it compares correct periods and is fast #20094

Merged
merged 2 commits into from Dec 12, 2022

Conversation

tsteur
Copy link
Member

@tsteur tsteur commented Dec 12, 2022

Since we merged #20090 when comparing dates we no longer need to force day periods when comparing dates since we're ensuring the correct period is being used in the Sparklines visualisation.

Deployed that PR on production and noticed the URL looks like:

image

Even though both periods given are week it falsely chose day for the initial period. Which not only made it compare wrong data but also got very slow (since it had to load 365 days which is slower than 52 weeks).

This PR fixes it and now looks like
image

Description:

Please include a description of this change and which issue it fixes. If no issue exists yet please include context and what problem it solves.

Review

…t compares correct periods

Since we merged #20090 when comparing dates we no longer need to force day periods when comparing date ranges since we're ensuring the correct period is being used in the Sparklines visualisation.
@tsteur tsteur added c: Performance For when we could improve the performance / speed of Matomo. Needs Review PRs that need a code review labels Dec 12, 2022
@tsteur tsteur added this to the 4.13.1 milestone Dec 12, 2022
Copy link
Member

@sgiehl sgiehl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants