[BUGFIX] Do not fetch records from tables without references 78/37478/3
authorStephan Großberndt <stephan@grossberndt.de>
Tue, 9 Dec 2014 13:42:05 +0000 (14:42 +0100)
committerNicole Cordes <typo3@cordes.co>
Tue, 3 Mar 2015 19:54:18 +0000 (20:54 +0100)
commit223e0876e1fc81e896b032f9b526c86b961c017d
treee96e91db165bea18fb1bd6b58e64999f065c56a6
parent57f749d1fec1fa4964f37627ec9868cfdfbd4382
[BUGFIX] Do not fetch records from tables without references

If no field of a table can contain a reference by its TCA definition
do not fetch record from this table at all. For tables with fields
which can possibly contain references fetch only these fields instead
of all.

Cache list of fields which don't have to be checked in the local member
'nonRelationFields' instead of recreating the list for each and every
record.

Don't try to update references for tables sys_log, sys_history and
tx_extensionmanager_domain_model_extension since they cannot contain
references and usually have a big amount of records.

Introduce some early returns to make code more readable.

Improves performance for both bulk inserts and updating the reference
index from the command line.

Resolves: #63676
Resolves: #63782
Releases: master, 6.2
Change-Id: Ibc6f988bfde6042339595bf7b3e18125c64ae72d
Reviewed-on: http://review.typo3.org/37478
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes <typo3@cordes.co>
typo3/sysext/core/Classes/Database/ReferenceIndex.php