Feature #55199

Avoid Buffering of Shell output

Added by Kay Strobach over 1 year ago. Updated over 1 year ago.

Status:New Start date:2014-01-21
Priority:Should have Due date:
Assigned To:- % Done:

0%

Category:Cli
Target version:-
PHP Version: Complexity:easy
Has patch:No

Description

Currently Shell output is buffered in TYPO3\Flow\Cli\Response->appendContent(), this does not make sense IMHO, especially for long lasting operations.
  • this can be misinterpreted as a hanging / slow program
  • this can cause exceeding memory limits
  • users don't understand it.

Therefore i suggest to output the CLI output directly!

I made it working with AOP, afterwards you may need some additional cleaning in the other CLI\Response methods, which are useless after the patch ;)

History

#2 Updated by Bastian Waidelich over 1 year ago

  • PHP Version deleted (5.4)

Good point. But instead of changing the behavior, I'd suggest to add a flag to the output* methods that forces direct rendering (for backwards compatibility reasons).
BTW: Instead of using AOP you could also override these methods in your package: https://gist.github.com/bwaidelich/8536527

#3 Updated by Kay Strobach over 1 year ago

imho changing the behaviour at this point it best, eventually we can just make an UnbufferedCommandController which can be used as a base for extending

#4 Updated by Bastian Waidelich over 1 year ago

Kay Strobach wrote:

imho changing the behaviour at this point it best

Maybe you're right.. I can't remember why we decided to buffer the output. Lets see what others think

#5 Updated by Kay Strobach over 1 year ago

having that changed we can use more advanced symfony/console features :D

#6 Updated by Dominique Feyer over 1 year ago

+1 remove buffer ;)

Look like it can break the formatted output, with Bastian's gist.

#7 Updated by Kay Strobach over 1 year ago

mine (with the aop stuff) is working in production since 8 weeks now

Also available in: Atom PDF