Skip to content
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

Skip saving output to variable when using callback function #11

Open
stefandoorn opened this issue Oct 6, 2015 · 0 comments
Open

Skip saving output to variable when using callback function #11

stefandoorn opened this issue Oct 6, 2015 · 0 comments

Comments

@stefandoorn
Copy link

My case is currently that I'm streaming use log files using sh::cat() and using a callback closure to pass the data (after a filter) to an PHPExcel object. The log files can easily get over 500MB. Looking through the code it seems that even when using a callback/closure, the output of the cat command still gets saved to a variable, making memory usage go up and up.

I cannot grep on the log files as it's filled with IDs, possible conflicting with other data in the same line.

Is this currently possible in a less memory consuming way? Else I'm also willing to submit a PR with some extra functionality on this. Reasoning could be that when streaming through a closure, no need is left to save things to the self::$output variable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant