amazon-cognito-js
amazon-cognito-js copied to clipboard
Chrome crashes with around 700 records in a dataset
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.
Thanks for pointing this out. We will address the large stack issue in a coming release.
Hi, can you confirm that we can use, modify, copy, and redistribute your code suggestion?
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).