Due to the way setTimeout forces the browser to wait at minimum 4 ms before
resuming the computation it makes the async pbkdf2 very slow, taking a full 10
seconds with 2000 iterations. I've added a loop forcing it to compute for at
least 100ms before returning to the browser, this gives it speed without much
browser lag:
while (i < iterations && ((new Date()).getTime() - start.getTime()) < 100)
I've attached a copy of the source for reference.
Original issue reported on code.google.com by ultraman...@gmail.com on 21 Feb 2012 at 6:03
Original issue reported on code.google.com by
ultraman...@gmail.com
on 21 Feb 2012 at 6:03Attachments: