Skip to content

Refs #23342 - Manage Live API Model Offset / Count / timeframe split correctly and more memory efficient#23673

Merged
sgiehl merged 2 commits intomatomo-org:dev-19232from
peterbo:patch-3
Dec 10, 2025
Merged

Refs #23342 - Manage Live API Model Offset / Count / timeframe split correctly and more memory efficient#23673
sgiehl merged 2 commits intomatomo-org:dev-19232from
peterbo:patch-3

Conversation

@peterbo
Copy link
Copy Markdown
Contributor

@peterbo peterbo commented Oct 14, 2025

Description:

Refs #23342

Try to fix the Live API Model to:

  • handle the offset correctly (e.g. &filter_offset=377000&filter_limit=200 always created wrong / empty results)
  • only count necessary data from offset (memory efficient)
  • split dates into multiple queries created overlapping timeframes

Review

Try to fix the Live API to:
- handle the offset correctly
- only count necessary data from offset (memory efficient)
- split dates into multiple queries created overlapping timeframes
@peterbo peterbo changed the title Refs #23342 Refs #23342 - Manage Live API Model Offset / Count / timeframe split correctly and more memory efficient Oct 14, 2025
@michalkleiner
Copy link
Copy Markdown
Contributor

Hi @peterbo, thanks so much for creating the PR and looking into the offset problem.
Since no tests were added and nothing started to fail, it looks like the behaviour that previously didn't work (based on the issue) wasn't covered by a test. Do you think you would have time to also add a new test that we can run before/after this PR to validate it fixes the problem?

@peterbo
Copy link
Copy Markdown
Contributor Author

peterbo commented Oct 28, 2025

Hi @michalkleiner, I have no test suite / dev running on my environment. I have to prepare it and make it work. It'll take some time though.

@michalkleiner
Copy link
Copy Markdown
Contributor

Thanks @peterbo, that's understandable. If it's of any help, Matomo comes with DDEV project config and it should be quite straightforward setting one up for development, if you wanted to give it a go. Check out https://github.com/matomo-org/matomo/blob/5.x-dev/.ddev/README.md.

@github-actions
Copy link
Copy Markdown
Contributor

If you don't want this PR to be closed automatically in 28 days then you need to assign the label 'Do not close'.

@github-actions github-actions Bot added the Stale The label used by the Close Stale Issues action label Nov 12, 2025
@sgiehl sgiehl changed the base branch from 5.x-dev to dev-19232 December 10, 2025 16:12
@sgiehl
Copy link
Copy Markdown
Member

sgiehl commented Dec 10, 2025

I'll merge this one into another branch to add some (AI generated) tests for it there

@sgiehl sgiehl merged commit 97ca14c into matomo-org:dev-19232 Dec 10, 2025
27 of 29 checks passed
sgiehl added a commit that referenced this pull request Dec 17, 2025
…more memory efficient (#23889)

* Refs #23342 - Manage Live API Model Offset / Count / timeframe split correctly and more memory efficient (#23673)

* Refs #23342

Try to fix the Live API to:
- handle the offset correctly
- only count necessary data from offset (memory efficient)
- split dates into multiple queries created overlapping timeframes

* More offset corrections

* remove unused method parameter

* Add more tests around limit/offest handling

---------

Co-authored-by: Peter Boehlke <github@media-proweb.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Stale The label used by the Close Stale Issues action

Development

Successfully merging this pull request may close these issues.

3 participants