Review main Merged

77948[BUGFIX] Avoid useless database updates in DataHandler

Andreas Kienast CR +2 V +2 Easy +6 −5 updated 03/01/23, 09:50

Commit message

DataHandler has an internal check that compares the sent payload with
the state of the affected database record and removes fields from the
payload that didn't change.

Everytime a database record is updated, DataHandler resets the internal
stage to "0" to start a new editing workflow, if the affected database
table supports workspaces. This handling is unfortunately executed
*after* the payload comparison is done, leading to a payload that
always instructs to update the field `t3ver_stage`, even if the change
is not necessary, leading to superfluous database updates. This has a
massive negative performance impact in simple shared hosting
environments, especially with tt_content records that have many
file references attached.

The payload comparison is now executed after setting `t3ver_stage` to
filter out superfluous updates.

Review

  • Code review CR +2 Done
    • Andreas Kienast +2
    • Georg Ringer +1
    • Markus Klein +1
    • Christian Kuhn +1
    • Benni Mack +1
  • Verified V +2 Done
    • Andreas Kienast +2
    • Georg Ringer +1
    • Markus Klein +1
    • Christian Kuhn +1
    • core-ci +1 CI

Issues 1

Files 1

Review log 1315

  1. Andreas Kienast uploaded patch set 1 02/26/23, 14:40

  2. core-ci voted on patch set 1 V +1 02/26/23, 14:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38114

  3. Oliver Hader voted on patch set 1 CR +1 02/26/23, 18:52

  4. Thomas Hohn voted on patch set 1 CR +1 02/27/23, 06:05

  5. Georg Ringer commented on patch set 1 02/27/23, 07:29

    DataHandler.php:1079

    just by reading: isn't the tstamp field now always differnt? would move setting below the comparing
  6. Andreas Kienast commented on patch set 1 02/28/23, 07:32

    DataHandler.php:1079 Reply

    That wasn't the case when stepping thru with xdebug, but looks valid anyway. Will take a look again, thanks.
  7. Andreas Kienast uploaded patch set 2 CR +1 V +1 02/28/23, 07:39

  8. Andreas Kienast commented on patch set 2 02/28/23, 07:39

    DataHandler.php:1079 Reply

    Done
  9. core-ci voted on patch set 2 V +1 02/28/23, 07:46 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38185

  10. Georg Ringer voted on patch set 2 V +1 CR +1 02/28/23, 09:16

  11. Benni Mack voted on patch set 2 CR +1 03/01/23, 09:24

  12. Christian Kuhn voted on patch set 2 V +1 CR +1 03/01/23, 09:37

  13. Markus Klein voted on patch set 2 V +1 CR +1 03/01/23, 09:41

  14. Andreas Kienast voted on patch set 2 V +2 CR +2 03/01/23, 09:50

  15. Andreas Kienast merged patch set 3 03/01/23, 09:50