Feature #55199

Avoid Buffering of Shell output

Added by Kay Strobach almost 8 years ago. Updated over 7 years ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Cli
Target version:
-
Start date:
2014-01-21
Due date:
% Done:

0%

Estimated time:
PHP Version:
Has patch:
No
Complexity:
easy

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 ;)

#2

Updated by Bastian Waidelich almost 8 years 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 7 years 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 7 years 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 7 years ago

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

#6

Updated by Dominique Feyer over 7 years ago

+1 remove buffer ;)

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

#7

Updated by Kay Strobach over 7 years ago

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

Also available in: Atom PDF