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

Prevent recomputing of metric metadata in EvolutionMetrics #22818

Merged
merged 5 commits into from
Dec 9, 2024

Conversation

caddoo
Copy link
Contributor

@caddoo caddoo commented Dec 4, 2024

Description:

As part of an effort to improve the performance of the all websites dashboard, an optimisation has been done here to prevent recomputing of ratio, currency symbol, period name and previousRange.

Reducing the overall impact the call to Piwik\Plugins\CoreHome\Columns\Metrics\EvolutionMetric::compute has

XHProfs

All Websites Dashboard - Without Change
image

All Websites Dashboard - With Change
image

Notice number of calls to compute are the same

Evolution popup

It was suggested to make sure the performance of this popup wasn't affected, but in testing it turns out that that popup doesn't touch EvolutionMetric::compute @mneudert can you confirm?

Review

@caddoo caddoo requested a review from a team December 4, 2024 21:47
@caddoo caddoo added not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. Needs Review PRs that need a code review and removed not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. labels Dec 4, 2024
@caddoo caddoo marked this pull request as ready for review December 4, 2024 21:48
@caddoo caddoo changed the title Prevent recomputing of ratio, currency symbol and previousRange to op… Prevent recomputing of metric metadata in EvolutionMetrics Dec 4, 2024
Copy link
Contributor

@michalkleiner michalkleiner left a comment

Choose a reason for hiding this comment

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

LGTM

@caddoo caddoo merged commit ff14ebf into 5.x-dev Dec 9, 2024
26 checks passed
@caddoo caddoo deleted the dev-18680-evolution-metric-performance branch December 9, 2024 18:34
@mneudert mneudert added the c: Performance For when we could improve the performance / speed of Matomo. label Dec 9, 2024
@mneudert mneudert added this to the 5.3.0 milestone Dec 9, 2024
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. Needs Review PRs that need a code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants