-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[2.3][Process] Use stream based storage to avoid memory issues #17423
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[2.3][Process] Use stream based storage to avoid memory issues #17423
Conversation
romainneutron
commented
Jan 18, 2016
Q | A |
---|---|
Bug fix? | yes |
New feature? | no |
BC breaks? | no |
Deprecations? | no |
Tests pass? | yes |
Fixed tickets | #17390 |
License | MIT |
|
||
if (false === $latest) { | ||
return ''; | ||
if ($this->outputDisabled) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
undefined. see tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
woops, fixed
7663f4a
to
1752677
Compare
@@ -378,7 +378,7 @@ public function getOutput() | |||
|
|||
$this->readPipes(false, '\\' === DIRECTORY_SEPARATOR ? !$this->processInformation['running'] : true); | |||
|
|||
return $this->stdout; | |||
return (string) stream_get_contents($this->stdout, -1, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
casting to string triggers copy-on-writes, it would be better to use an if
here
1752677
to
fa37d36
Compare
Comments addressed, PR updated |
fa37d36
to
da73125
Compare
I just updated the PR, I reduced the temp stream to 1M at max before switching on fs. I've also changed the streams mode from |
👍 |
Thank you @romainneutron. |
…sues (romainneutron) This PR was merged into the 2.3 branch. Discussion ---------- [2.3][Process] Use stream based storage to avoid memory issues | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #17390 | License | MIT Commits ------- da73125 [Process] Use stream based storage to avoid memory issues
…ge (romainneutron) This PR was merged into the 2.7 branch. Discussion ---------- [2.7][Process] Update in 2.7 for stream-based output storage | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #17390 | License | MIT This PR should be rebased once #17423 has been merged. It contains fixes related to methode `Process::getErrorOutput` and `Process::getOutput` that do not exist in branch 2.3 Commits ------- 2d931f4 [Process] Use stream based storage to avoid memory issues