Skip to content

scan(..., skip=1e11): infinite loop; cannot interrupt

1 message · Tomas Kalibera

#
On 2/11/23 09:33, Ivan Krylov wrote:
Thanks, I've updated the implementation of scan() in R-devel to be 
interruptible while skipping lines.

I've done it slightly differently as I found there already was a memory 
leak, which could be fixed by creating the context a bit earlier.

I've also avoided modulo on the fast path as I saw 13% performance 
overhead on my mailbox file. Decrementing and checking against zero 
didn't have measurable overhead.

Best
Tomas