there is an error in your script:
for (i = $1->rowCount -1; i >= 0; i++)
you start with last row (let's say 10 or something like this) and likely want to go down to row 0. But you increment i instead of decrementing it, so it went all way up to 2147483648 (power 31 of 2) where it wraps to -1 due to integer overflow and only then loop stops. So you script done more than two billion iterations - quite a lot for scripting language even on modern hardware.
Best regards,
Victor
for (i = $1->rowCount -1; i >= 0; i++)
you start with last row (let's say 10 or something like this) and likely want to go down to row 0. But you increment i instead of decrementing it, so it went all way up to 2147483648 (power 31 of 2) where it wraps to -1 due to integer overflow and only then loop stops. So you script done more than two billion iterations - quite a lot for scripting language even on modern hardware.
Best regards,
Victor
