-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
BugFor errors / faults / flaws / inconsistencies etc.For errors / faults / flaws / inconsistencies etc.c: PerformanceFor when we could improve the performance / speed of Matomo.For when we could improve the performance / speed of Matomo.duplicateFor issues that already existed in our issue tracker and were reported previously.For issues that already existed in our issue tracker and were reported previously.
Description
Problem
The piwikApiService
class contains an array called allRequests
that it appends to whenever the frontend makes an API request. However, it only clears this array if abortAll
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 by abortAll
.
A simple solution is to remove requests when they complete. To do this, change line 170 to the following:
allRequests.push(request);
promise.finally(function() {
var index = allRequests.indexOf(request);
if (index !== -1) {
allRequests.splice(index, 1);
}
});
Metadata
Metadata
Assignees
Labels
BugFor errors / faults / flaws / inconsistencies etc.For errors / faults / flaws / inconsistencies etc.c: PerformanceFor when we could improve the performance / speed of Matomo.For when we could improve the performance / speed of Matomo.duplicateFor issues that already existed in our issue tracker and were reported previously.For issues that already existed in our issue tracker and were reported previously.