[BUGFIX] Avoid redundant SQL queries in ReferenceIndex 71/53271/2
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:27:19 +0000 (11:27 +0200)
commit823fb1b77624a79901c31dcf1abd717a81a594f4
treef8d7b018d738380daedb745864af9fe37cbe6831
parent5ec48ab30277957f5056523187a205760f05b89b
[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/53271
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/core/Classes/Database/ReferenceIndex.php