In archiving process, truncate datatables in-place everywhere this can result in speed gains #3484
Labels
c: Performance
For when we could improve the performance / speed of Matomo.
not-in-changelog
For issues or pull requests that should not be included in our release changelog on matomo.org.
Task
Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Milestone
Most of Piwik when archiving will generate DataTables and then apply a sort and truncation filter before storing them as records. This is highly inefficient when dealing w/ DataTables w/ thousands of rows, since every one of those rows will have to be first allocated & constructed then sorted.
As done in the Actions plugin it is possible to apply ordering through the SQL and then use new DataTable functions to limit the number of rows in a DataTable w/o having to create and sort every possible one. This technique should be used everywhere possible.
The text was updated successfully, but these errors were encountered: