area9innovation / flow9

Platform for safe, easy and productive programming of complex, multi-platform apps with a modern user interface
Other
567 stars 34 forks source link

[splitByNumber] Use tail recursion to avoid out of memory error #1346

Closed ClaudioChiarella closed 3 months ago

ClaudioChiarella commented 3 months ago

During the test with Bridge's fixup for creator, we see that browser crash if there are 2M of contents ids that should be slitted in group of 1k ids. The cause is the recursion in splitByNumber, so I modify it to use tail recursion