TakeWhile version 7 #298
Replies: 7 comments 11 replies
-
Ciao Marco, Thanks for using I'll investigate a little bit and try to remember why I changed the implementation. IIRC, I think I changed it to reuse existing stuff instead of making something completely custom. That said, the implementation is based on Anyhow, I will definitely investigate. What would be nice is that if you could provide a code sample and the 2 versions numbers of Thanks! |
Beta Was this translation helpful? Give feedback.
-
Okay! I will give you the two examples! However my perplexity was: is the new version of takeWhile based on Every and therefore scrolling through the whole collection? Thanks! |
Beta Was this translation helpful? Give feedback.
-
No. The current implementation of Every yields each element of the iterable(or collection) until a predicate returns a boolean false value. In the meantime, I made a better version of |
Beta Was this translation helpful? Give feedback.
-
Ok! Thanks! But Every yield only one element, am I missing something? true o false I'm sorry to "bother" you! |
Beta Was this translation helpful? Give feedback.
-
This is snippet:
With version 6.0.3 the memory is stable, instead with version 7 the memory increases |
Beta Was this translation helpful? Give feedback.
-
Great! |
Beta Was this translation helpful? Give feedback.
-
...Maybe, later, You can reinsert the cache considering the DSL node with some more configurations...
to reach something like:
However... I stop! |
Beta Was this translation helpful? Give feedback.
-
Hi,
I love Loophp Collection!
However I would like to ask you why TakeWhile has changed drastically.
It used to be lazy, now it uses cache if I'm not mistaken and this thing can impact on performance?
In my Business Logic I iterates tens of thousands...
best regards
Beta Was this translation helpful? Give feedback.
All reactions