You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The request data collector store the data from $_SESSION which contains the stacked data, which in turn contains the data from the request collector, etc, so memory usage double with each request. So with multiple requests that have a request data collector and getting stacked, that becomes a problem rather quickly.
The text was updated successfully, but these errors were encountered:
FWIW, I have created a derived class locally, that simply drops the stacked data from the session whenever collecting data:
/** * @return mixed[] */publicfunctioncollect(): array
{
$http = $this->initStackSession();
// Avoid quadratic memory usage growth by removing any stacked data// from the session, as the stacked data may also contains the session$stack = $http->getSessionValue($this->stackSessionNamespace);
$http->deleteSessionValue($this->stackSessionNamespace);
$data = parent::collect();
$stack = $http->setSessionValue($this->stackSessionNamespace, $stack);
return$data;
}
dotdash
changed the title
Quadratic memory usage growth with stacked data and Request collector
Exponential memory usage growth with stacked data and Request collector
Aug 21, 2024
The request data collector store the data from
$_SESSION
which contains the stacked data, which in turn contains the data from the request collector, etc, so memory usage double with each request. So with multiple requests that have a request data collector and getting stacked, that becomes a problem rather quickly.The text was updated successfully, but these errors were encountered: