amazon-cognito-js icon indicating copy to clipboard operation
amazon-cognito-js copied to clipboard

Chrome crashes with around 700 records in a dataset

Open skkiran-pro opened this issue 10 years ago • 3 comments

i guess its happening because of huge stack in "CognitoSyncLocalStorage.prototype.putRecords". adding a "setTimeout(request, 0)" instead of "request()" inside the inner "request" method seems to fix it and does not crash even with 1000 records.

same problem in "CognitoSyncLocalStorage.prototype.putAllValues". using "function(){setTimeout(request,0)}" for callback of putValue call fixed it.

skkiran-pro avatar Nov 17 '14 07:11 skkiran-pro

Thanks for pointing this out. We will address the large stack issue in a coming release.

mikemurry avatar Dec 31 '14 17:12 mikemurry

Hi, can you confirm that we can use, modify, copy, and redistribute your code suggestion?

mikemurry avatar Feb 19 '15 18:02 mikemurry

Sure. Generally, performance of the library is not great with lots of records. setTimeout fix does resolve crash, but you should still be able to do most of the processing sequentially (without nested calls).

skkiran-pro avatar Feb 19 '15 22:02 skkiran-pro