Bug #28995

Deferred Loading does not work with Doctrine QueryResult

Added by Sebastian Kurfuerst almost 4 years ago. Updated almost 4 years ago.

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

related to TYPO3.Flow - Bug #26862: Doctrine\Query is not serializable Resolved 2011-05-17 2011-05-18
duplicated by TYPO3 Flow Base Distribution - Bug #29045: Wakeup of Query sets wrong state if originally no constra... Resolved 2011-08-17

Associated revisions

Revision 237b0ac7
Added by Sebastian Kurfuerst almost 4 years ago

[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

Also available in: Atom PDF