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

When aggregating reports, inflate one expanded datatable at a time #17817

Merged
merged 26 commits into from Aug 19, 2021

Conversation

diosmosis
Copy link
Member

Description:

Currently when aggregating reports over multi periods, we get the blob data for every child period, inflate the blob data for every period into a DataTable tree, then add them together. Afterwards we clean up the extra DataTables, but in the meantime a lot of memory is used, especially when the reports are large. This PR switches to inflating the DataTable tree for just one period at a time and should use less memory overall.

Review

  • Functional review done
  • Potential edge cases thought about (behavior of the code with strange input, with strange internal state or possible interactions with other Matomo subsystems)
  • Usability review done (is anything maybe unclear or think about anything that would cause people to reach out to support)
  • Security review done see checklist
  • Code review done
  • Tests were added if useful/possible
  • Reviewed for breaking changes
  • Developer changelog updated if needed
  • Documentation added if needed
  • Existing documentation updated if needed

@diosmosis
Copy link
Member Author

Transitions screenshot change is not correct, but it is due to an unrelated bug: #17875

@diosmosis diosmosis added the Needs Review PRs that need a code review label Aug 17, 2021
@diosmosis diosmosis added this to the 4.5.0 milestone Aug 17, 2021
@diosmosis diosmosis requested a review from sgiehl August 17, 2021 23:38
@diosmosis
Copy link
Member Author

@sgiehl removed the debugging code and fixed some tests

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.

Looks good to me. Tests seem to be passing again 👍
Not sure if maybe @tsteur wants to have another quick look before merging?

@tsteur
Copy link
Member

tsteur commented Aug 19, 2021

Looks good to me @diosmosis 👍 Great, this will reduce memory quite a bit 💯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants