Hi Carsten and Sean, I just had a chance to try this out and it looks good. I encoded a ~1MB > string in ~1.8 seconds. The biggest time sink for me was now > openpgp_cfb_encrypt as we might expect. > > GPG didn't complain about the CRC generated, so I think the values are > correct (but obviously didn't get to individually check all of them). Nice > work, Carsten. > > I think between this and the other text optimizations, we've captured most > of the "low hanging fruit" of optimizations which has provided speed ups of > orders of magnitude, so that's good news. >
I found the time to write a benchmark in qunit and was just able to verify Sean's results: Benchmark results before patch: blob size [bytes]: 2589258 crypto_test.js:38 <http://localhost:8080/pgpbox/test/crypto_test.js>Time taken for encryption [ms]: 8735 crypto_test.js:40 <http://localhost:8080/pgpbox/test/crypto_test.js>blob cipher size [bytes]: 3511050 crypto_test.js:46 <http://localhost:8080/pgpbox/test/crypto_test.js>Time taken for decryption [ms]: 46227 crypto_test.js:50 <http://localhost:8080/pgpbox/test/crypto_test.js>decrypted blob size [bytes]: 2589258 After the path: blob size [bytes]: 2589258 crypto_test.js:38 <http://localhost:8080/pgpbox/test/crypto_test.js>Time taken for encryption [ms]: 1555 crypto_test.js:40 <http://localhost:8080/pgpbox/test/crypto_test.js>blob cipher size [bytes]: 3511050 crypto_test.js:46 <http://localhost:8080/pgpbox/test/crypto_test.js>Time taken for decryption [ms]: 37381 crypto_test.js:50 <http://localhost:8080/pgpbox/test/crypto_test.js>decrypted blob size [bytes]: 2589258 This is 5,6x faster! Many thanks to you! Carsten... you the man :) Tankred
_______________________________________________ http://openpgpjs.org

