Skip to content
This repository has been archived by the owner on May 19, 2021. It is now read-only.

Output buffering during buildFrom* functions #21

Closed
wants to merge 1 commit into from

Conversation

vaind
Copy link

@vaind vaind commented Dec 9, 2015

Improves performance by ~ 20 % if there are a lot of files

Improves performance by ~ 20 % if there are a lot of files
@kherge
Copy link
Contributor

kherge commented Jul 9, 2016

Would it make more sense to wrap the foreach block in a try/catch, stop the buffering in the catch, and then re-throw the exception?

@vaind
Copy link
Author

vaind commented Jul 12, 2016

Yes it would. Another solution is to just create an exception (local var $ex) instead of throwing it and breaking out of foreach. At the end of the function check if (isset($ex)) throw $ex;

@kherge
Copy link
Contributor

kherge commented Jul 15, 2016

I would opt for catching the exception.

Could you please make that change?

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

Successfully merging this pull request may close these issues.

3 participants