Review main Merged

83007[TASK] Stop runtime caching GU::trimExplode() in DH

Christian Kuhn CR +2 V +2 Easy +4 −25 updated 02/15/24, 12:03

Commit message

There is no point to substitute GU::trimExplode() of
the rather short TCA 'eval' string by substituting
it with an md5() operation plus runtime cache object
operations.

Both things are most likely similarily quick, and
the time consumed by queries in DH is multiple orders
of magnitude bigger than this simple operation, a
difference is not measurable.

Let's thus simplify the code a bit.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Oli Bartsch +1
    • Oliver Klee +1
    • Stephan Großberndt +1
    • Markus Klein +1
    • Stefan Bürk +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Oli Bartsch +1
    • Oliver Klee +1
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 1

Files 1

Review log 1315

  1. Christian Kuhn uploaded patch set 1 02/15/24, 09:50

  2. Christian Kuhn uploaded patch set 2 02/15/24, 09:52

  3. core-ci voted on patch set 1 V +1 02/15/24, 09:56 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53221

  4. core-ci voted on patch set 2 V +1 02/15/24, 09:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53222

  5. Oliver Klee voted on patch set 2 CR +1 02/15/24, 10:04

  6. Stephan Großberndt voted on patch set 2 CR +1 02/15/24, 10:05

  7. Markus Klein voted on patch set 2 CR +1 02/15/24, 10:09

  8. Stefan Bürk voted on patch set 2 CR +1 V +1 02/15/24, 10:16

  9. Oli Bartsch voted on patch set 2 CR +1 V +1 02/15/24, 10:20

  10. Stephan Großberndt commented on patch set 2 CR 0 02/15/24, 10:22

    @lolli@schwarzbu.ch Could you please test how this performs in current TYPO3 versions when adding many records using DataHandler? Years ago I went on a crusade in order to lower memory consumption, this was one of the bigger memory hogs as visible in https://forge.typo3.org/issues/63670
  11. Christian Kuhn commented on patch set 2 02/15/24, 11:44

    Reply

    did a quick test with main, clean install, main bootstrap_package, ext:peak_memory loaded, then loading and importing ext:introduction data (which imports quite a few records): without patch: 43359392 bytes peak memory, 8.42 sec parsetime with patch: 43276240 bytes peak memory, 8,35 sec parsetime rather similar. i think we have at least the following points that influence this: * php version of course, e.g. garbage collection became much better * the patch a few years ago not only added the runtime cache, but did shortcut the lower level method as well, which is kept with above cache * we reduced 'eval' a lot, it's much less frequent within TCA now * GU::trimExplode() has most likely been optimized meanwhile
  12. Stephan Großberndt commented on patch set 2 CR +1 02/15/24, 11:49

    Reply

    Acknowledged
  13. Oliver Klee voted on patch set 2 V +1 02/15/24, 11:57

  14. Christian Kuhn voted on patch set 2 CR +2 V +2 02/15/24, 12:03

  15. Christian Kuhn merged patch set 3 02/15/24, 12:03