Closed (fixed)
Project:
Recurring Dates Field
Version:
8.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Issue tags:
Reporter:
Created:
18 Aug 2018 at 13:37 UTC
Updated:
6 Oct 2018 at 16:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
dpiComment #3
dpiComment #4
dpiComment #5
dpiComment #6
dpiComment #9
joelpittetI'm liking the look of this clean up. Question about this bit of code:
What is
yield?Couldn't find it in php.net/yield
Comment #10
joelpittetStrange that didn't find it but I guess it has to be a function, learned something new:)
http://php.net/manual/en/language.generators.syntax.php
Comment #11
dpiGenerators are a lot of fun.
Basically PHP will keep a function around in memory similar to a process. If you iterate over the function new values are generated. The function will pause (like a process) if/until the next iteration happens.
Comment #12
joelpittetNot sure if you want a new issue for this but here's a quick patch for a missing
isRecurring()call.Comment #13
joelpittetAlso, re generators. I wonder what the performance implications are of keeping them in memory are, have you profiled them before?
Comment #14
joelpittetThey look pretty much the same in my super poor profile:)
https://3v4l.org/KJMt3/perf#output
https://3v4l.org/BskcY/perf#output
Comment #15
dpi#12 no longer relevant as the method was removed.