Memory usage is something that we as developers have to be aware of. Ever debugging a memory issue and find that your once small dataset has ballooned out of proportion? And instead of dealing with the issue, you opt for upping the memory limit?
Iterators can be the answer but they require a lot of code and can be very difficult to understand at a glance. Thankfully since PHP 5.5 Generators help us create and manage what would be complex iterators with simple syntax sugar.
In this talk I will go over some of the ways you can implement generators and cure your memory bloat.

Comments

Comments are closed.

Dana Luther at 21:18 on 9 Feb 2018

It was a shame that the technical issues made it so had to follow this presentation. I feel like there was a lot of good information there which I just couldn’t follow. It sounds like I definitely need to research the possibilities for implementing this type of improvement in the applications that I work with and I’m excited to learn something new. I’d kind of like to sit through it again as an un-con just to see if a smaller space and solved technical issues would help convey all the info.

Brilliant talk Korvin. Timing was perfect 30 mins and time for questions. Font was small.

I have been in this position a lot. Generally, we opt to just increase the memory limit on the script and add a comment about kicking the can down the road. Using generators seems like a great way to reduce the overhead of loading 4 copies of a multi-gigabyte data set into memory. I didn't really understand them at first, but after seeing them used in practice, I get it. :)

The slides and font could have been larger. Sitting anywhere past the first row made things difficult to read/see. Didn't affect my rating, since I think once you work out the technical issues, the material doesn't change and is still great.