The problem of using the [number of rows in] block in a loop

My research shows that using the [number of rows in] block in a loop block is much slower when it is not in the loop block.

I think the problem is that, firstly, this block is calculated very slowly and, secondly, it is calculated at each iteration of the loop, which looks quite strange to me personally.

ΠΈΠ·ΠΎΠ±Ρ€Π°ΠΆΠ΅Π½ΠΈΠ΅

Yes, I was not mistaken. 100 iterations for the [length of] block run on Android for 0.001 seconds, and for the [number of rows in] block when using Local DB - for 0.49 seconds (500 times slower)!

1 Like

Thanks, this is a valuable hint! Maybe the β€œnumber of rows” gets recalculated, because when there a items deleted or inserted inside of the loop the number of elements changes?

No, there is no data change in the loop. The blocks for evaluating performance are shown below