mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
getSingleScalarResult: Enormous memory (100 MB+) and time usage if xdebug enabled #7361
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @arkhamvm on GitHub (May 4, 2024).
Bug Report
PHP 8.3.6 (FROM php:8.3.6-fpm)
Xdebug v3.3.2
Summary
Current behavior
If
NoResultExceptionis thrown inSingleScalarHydrator::hydrateAllDatait 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/finallyinSingleScalarHydrator.Because this code will have no additional memory allocations:
How to reproduce
Call
getSingleScalarResultwith query that returnsNoResultExceptionwithxdebugenabled.XDebug Config:
Expected behavior
No additional memory allocations.