Bug #28995
Deferred Loading does not work with Doctrine QueryResult
Status: | Resolved | Start date: | 2011-08-16 | |
---|---|---|---|---|
Priority: | Must have | Due date: | ||
Assigned To: | Sebastian Kurfuerst | % Done: | 100% |
|
Category: | Persistence | |||
Target version: | TYPO3 Flow Base Distribution - 1.0 beta 1 | |||
PHP Version: | Complexity: | |||
Has patch: | Affected Flow version: |
Description
When looking into Doctrine\QueryResult, it becomes obvious that the rows are not lazily initialized on first access, but initialized all the time. This is a severe performance penalty.
In #26862 the Doctrine Query was made serializable; but it was never accessed as the QueryResult was not lazy. This needs to be fixed.
Related issues
Associated revisions
[BUGFIX] (Persistence): Implement deferred loading in Doctrine\QueryResult
Until now, Doctrine\QueryResult got all results passed into the constructor.
This change modifies the behavior such that queries are executed lazily, on first
access of the QueryResult object, leading to a big performance gain when dealing
with many objects.
Furthermore, cloned Query objects were still connected to the original instance,
as they shared the same QueryBuilder. This has been fixed as well.
Additionally, deserializing simple queries without a constraint now also works
properly. Before, this case lead to incomplete DQL, resulting in a Doctrine error.
All of the above is covered with Functional Tests.
Change-Id: Ide7faf982f68efe15eb2fdaa5c68063b7770a735
Resolves: #28995
History
#1 Updated by Mr. Hudson almost 4 years ago
- Status changed from Accepted to Under Review
Patch set 1 of change Ide7faf982f68efe15eb2fdaa5c68063b7770a735 has been pushed to the review server.
It is available at http://review.typo3.org/4358
#2 Updated by Mr. Hudson almost 4 years ago
Patch set 2 of change Ide7faf982f68efe15eb2fdaa5c68063b7770a735 has been pushed to the review server.
It is available at http://review.typo3.org/4358
#3 Updated by Sebastian Kurfuerst almost 4 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 237b0ac74d86ab207e1ee7c1715f7bf364cb2fa7.