Review main Merged

86576[TASK] Better handle PSR-14 event output in EXT:adminpanel

Christian Kuhn CR +2 V +2 Hard +137 −186 updated 10/14/24, 13:36

Commit message

When PSR-14 event dispatching has been added in TYPO3 v10,
the admin panel has been extended to list all dispatched
events with #90265.

This was good back in v10 with a relatively small number of
events being dispatched during a casual frontend rendering
call.

Nowadays, with many hooks being transformed into events, a
casual frontend request easily dispatches thousands of events.
Trying to render them all within the admin panel needs
hundreds of kilobytes of data to be transferred. And worse,
the resulting data is processed using symfony/var-dumper that
comes with JavaScript to create a collapsible view from it.
This client side processing triggers full CPU load for seconds,
even for tiny requests like the styleguide frontend, up to a
point that tabs crash with "He's dead Jim".

It seems we can not and should not render the full events
listing with all data anymore. With thousands of them being
dispatched, it gives no usable information anyway with the
sheer amount of data.

The patch heavily reduces the amount of rendered information:
We now only count the number of single events being dispatched
and render a simple table from it, similar to the existing
SQL view. This makes the admin panel usable and snappy again.

Devs who want to works with specific events need to debug their
data anyways and now receive a simple overview to see if they
are dispatched in their scenario.

Executed commands:
> composer rm symfony/var-dumper
> composer rm symfony/var-dumper -d typo3/sysext/adminpanel --no-update

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Garvin Hicking +1
    • Stefan Bürk +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Garvin Hicking +1
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 2

Files 11

Review log 1217

  1. Christian Kuhn uploaded patch set 1 10/13/24, 15:41

  2. Christian Kuhn uploaded patch set 2 10/13/24, 15:48

  3. core-ci voted on patch set 1 V -1 10/13/24, 15:49 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/67707

  4. core-ci voted on patch set 2 V +1 10/13/24, 15:54 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/67708

  5. Christian Kuhn commented on patch set 2 10/13/24, 16:17

    ContentSecurityPolicies.php:15

    Needs a test, probably the nonce stuff needs to be put into QueryInformation.php as it is obsolete in Events.php now?! QueryInformation has a couple of inline styles ...
  6. Christian Kuhn uploaded patch set 3 10/13/24, 16:30

    Copied Votes: * Verified+1 (copy condition: "**changekind:NO_CHANGE**")
  7. Christian Kuhn commented on patch set 3 10/13/24, 16:31

    rebased. still needs a manual test with enabled FE CSP.
  8. core-ci voted on patch set 3 V +1 10/13/24, 16:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/67712

  9. Christian Kuhn uploaded patch set 4 V +1 10/14/24, 09:43

  10. Christian Kuhn commented on patch set 4 10/14/24, 09:49

    Reply

    Done

    ContentSecurityPolicies.php:15 Reply

    We still need style 'unsafe-inline' since QueryInformation.html contains style="..." attributes for the 'progress bar'. But we don't need StyleSrcElem since there is no <style tag in admin panel.
  11. core-ci voted on patch set 4 V +1 10/14/24, 09:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/67748

  12. Garvin Hicking updated the commit message in patch set 5 V +1 10/14/24, 12:13

  13. Garvin Hicking voted on patch set 5 CR +1 V +1 10/14/24, 12:13

  14. core-ci voted on patch set 5 V +1 10/14/24, 12:18 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/67751

  15. Stefan Bürk voted on patch set 5 CR +1 V +1 10/14/24, 13:36

  16. Christian Kuhn voted on patch set 5 CR +2 V +2 10/14/24, 13:36

  17. Christian Kuhn merged patch set 6 10/14/24, 13:36