Minor JavaScript Memory Leak: piwikApiService
allRequests
array
#12105
Labels
Bug
For errors / faults / flaws / inconsistencies etc.
c: Performance
For when we could improve the performance / speed of Matomo.
duplicate
For issues that already existed in our issue tracker and were reported previously.
Problem
The
piwikApiService
class contains an array calledallRequests
that it appends to whenever the frontend makes an API request. However, it only clears this array ifabortAll
is called. Over a session with the Piwik dashboard, the array continues to grow as the frontend makes API requests.Solution
allRequests
should only contain active requests that have not yet completed, as it is only used byabortAll
.A simple solution is to remove requests when they complete. To do this, change line 170 to the following:
The text was updated successfully, but these errors were encountered: