Review main Merged

86518[BUGFIX] Allow dumping files larger than allowed memory size

Benjamin Franzke CR +2 V +2 Easy +3 −0 updated 10/09/24, 05:52

Commit message

The `SelfEmittableLazyOpenStream` class used by FileDumpController
uses `readfile` which is meant to be a performant way to send
files to the webserver (implemented by PHP in C) and does not
count as runtime memory usage (memory_limit) if the output is
unbuffered.

Make sure to clear any output buffers before emitting self emittable
streams in order for PHP to be able to send the files without copying
the contents into a temporary buffer (counting towards memory limit).

Review

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

Issues 1

Files 1

Review log 910

  1. Benjamin Franzke uploaded patch set 1 10/08/24, 13:50

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

  3. Stefan Bürk voted on patch set 1 CR +1 10/08/24, 14:15

  4. Benjamin Franzke commented on patch set 1 10/08/24, 14:47

    AbstractApplication.php:76

    Note: I'll look into possible impact of active output buffering in here as well (this doubles memory usage of the rendered page), but I wouldn't touch that in v12, so that'll be a different change.
  5. Andreas Kienast voted on patch set 1 CR +1 10/08/24, 14:50

  6. Benjamin Franzke commented on patch set 1 10/08/24, 14:52

    See https://forge.typo3.org/issues/105212#note-3 for a reproduction example
  7. Andreas Kienast voted on patch set 1 V +1 10/08/24, 14:56

  8. Garvin Hicking voted on patch set 1 CR +1 V +1 10/08/24, 17:18

  9. Andreas Kienast voted on patch set 1 CR +2 V +2 10/09/24, 05:51

  10. Andreas Kienast merged patch set 2 10/09/24, 05:52