This allows the user to set a limit on the size of the array. Once the size is met, instead of continuing to read in the data eating cpu to move the cursor, we can fast iterate and move the cursor without decoding anymore data, see the test for an example on how it works. I came across this issue in production. It makes the cpu run very hot even when I limit the size because in order to move the cursor to throw away the data, you need to call a decode method.
This allows the user to set a limit on the size of the array. Once the size is met, instead of continuing to read in the data eating cpu to move the cursor, we can fast iterate and move the cursor without decoding anymore data, see the test for an example on how it works. I came across this issue in production. It makes the cpu run very hot even when I limit the size because in order to move the cursor to throw away the data, you need to call a decode method.