Closed arkhamvm closed 1 month ago
Sounds like an xdebug problem and not a Doctrine one
@beberlei maybe. But in my 10+ years of php/web development, Doctrine/ORM is the first library that causes this problem. And it's sounds easier to make changes in Doctrine, then in xdebug...
Doctrine is not going to change its code when something else is causing problems
Bug Report
PHP 8.3.6 (FROM php:8.3.6-fpm) Xdebug v3.3.2
Summary
Current behavior
If
NoResultException
is thrown inSingleScalarHydrator::hydrateAllData
it will cause xdebug stuck atAbstractHydrator::hydrateAll
:In my project it is around 150 MB of memory and 5 seconds of time. At second similar call it consumes 800 MB of memory and 30 seconds.
It is absolutly accurate that memory usage caused by
try/finally
inSingleScalarHydrator
. Because this code will have no additional memory allocations:How to reproduce
Call
getSingleScalarResult
with query that returnsNoResultException
withxdebug
enabled.XDebug Config:
Expected behavior
No additional memory allocations.