Improve performance of tracker by speeding up dependency injection PHP DI #20215
Labels
c: Performance
For when we could improve the performance / speed of Matomo.
Major
Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Milestone
See profile of a tracker request below.
Around 70% (105 out of 150ms in total) of the time is spend in exclusively in the first 5 methods related to DI.
Typically, methods are executed very often are over-reported in Xhprof so it might be more like 30% or so but that would be still quite a lot of time.
Not sure if there's anything we can do ourselves in terms of configuring it, or if we would need to tweak PHP DI (which we could consider paying for if there's anything that can be done).
see https://php-di.org/doc/performances.html
Maybe enabling definition cache and/or compilation is something we can look into. Any solution would need to support https://developer.matomo.org/guides/multi-tenants where a Matomo runs with hundreds or thousands of different config files / instances. Seems we could eg configure a cache directory per account for example.
The text was updated successfully, but these errors were encountered: