[BUGFIX] Avoid redundant SQL queries in ReferenceIndex 66/50566/71
authorClaus Due <claus@namelesscoder.net>
Thu, 10 Nov 2016 10:50:20 +0000 (11:50 +0100)
committerBenni Mack <benni@typo3.org>
Tue, 20 Jun 2017 09:05:16 +0000 (11:05 +0200)
commit27ec75290977ac3b4dca07615e312de8f7d87957
treec6ad14d2ed8e0412c3bc71e63434aa1e47455f23
parente22a32e79295fd52a0e0cc4ddcf1090c879fa792
[BUGFIX] Avoid redundant SQL queries in ReferenceIndex

Change methods inside ReferenceIndex to allow them to receive an
existing record as array rather than a UID to avoid each method loading
it from the database again to read record or record fields.

For a copy operation on 25 pages with ~100 content elements total there
are 1,500 SQL queries less leading to a ~40% time reduction and
~10% memory reduction.

Change-Id: I0ed05478dfbc0535efc8d1d29b6a8298d475fb6b
Releases: master, 8.7
Resolves: #78634
Reviewed-on: https://review.typo3.org/50566
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Kasper Ligaard <kasperligaard+typo3.org@gmail.com>
Tested-by: Kasper Ligaard <kasperligaard+typo3.org@gmail.com>
Reviewed-by: Jigal van Hemert <jigal.van.hemert@typo3.org>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/core/Classes/Database/ReferenceIndex.php