Issue #28091 dirty objectStorage improvements

This page should document improvements that are done for solving issue #28091

Problem

Currently all mm-relation-rows gets deleted and build up new, if the corresponding
ObjectStorge is modified.

Solution

  1. Introduce a mechanism in objectstorage to check if the position of a object in objectstorage has changed in the lifetime of the storage
  2. change Tx_Extbase_Persistence_Backend::persistObjectStorage to
  • insert mm-relation rows only for new objects
  • update mm-relation/1:m-relations rows only for relations which positon is after an inserted object or the positon were an other object was moved to

Samples

objectstorage holding 100 M:M-relations to other objects

usecase sorting (*1) before sorting (*1) after query count before (*2) query count after queries saved
add object at the end 1...101 1...101 D: 1 / I: 101 I: 1 100
remove object from the end 1...99 1...99 D: 1 / I: 99 D: 1 99
add object at position 51 1...101 1...50,101...152 D: 1 / I: 101 I: 1 / U:50 51
remove object from position 51 1...99 1...50,52...100 D: 1 / I: 99 D: 1 99
move object from the end to position 51 1...100 1...50,101...151 D: 1 / I: 100 U: 50 51

objectstorage holding 100 1:M-relations to other objects

usecase sorting (*3) before sorting (*3) after query count before (*2) query count after queries saved
add object at the end 1...101 1...101 U: 101 U: 1 100
remove object from the end 1...99 1...99 U: 99 U:1 98
add object at position 51 1...101 1...50,101...152 U: 101 U:51 50
remove object from position 51 1...99 1...50,52...100 U: 99 U:1 98
move object from the end to position 51 1...100 1...50,101...151 U: 100 U: 50 50

(*1) value in the mm table
(*2) I: insert queries / D: delete queries / U: update queries
(*3) value in the foreign_sortby property