-
Notifications
You must be signed in to change notification settings - Fork 22
Heavy browser performance impact #92
Comments
Thank you for the throughout report, @Beanow 5🌟 There is a fix incoming specifically for this -- browserify/browserify-aes#48 -- waiting for a release! |
Hey @Beanow , Thanks for reporting, this is an issue with |
@Beanow Till it gets released, I made a fork that uses the unreleased version of |
👍 sweet, using the fixed version cuts the same process down to 32 seconds. It went down from >90K GC calls to 3400. Edit: cleaning things up more I got down to 2-4 seconds with the fix. |
Thanks @ya7ya, what I did though was put a dependency to |
Great, all credit goes to @dignifiedquire :D |
Woah! If this fixes what I think it'll fix, this will be a major improvement to the performance. Those ^ numbers sound amazing :) Great work everyone involved, thank you! |
@diasdavid since |
Not yet, there was an issue with the update to browserify-aes. it got mixed with the no unsafe-eval endeavour) ipfs/js-ipfs#991 which resulted in this big problem ipld/js-ipld-dag-pb#41). I had to unpublish it. Let me revert the switch to protobufjs done here https://github.com/libp2p/js-libp2p-crypto/commits/master and release it. |
@ya7ya libp2p-crypto@0.10.2 was published with the new browserify-aes. A fresh npm install (don't forget to delete package-lock.json) should get you a less memory hungry IPFS :) |
Tested a fresh npm install. This resolved to browserify-aes 1.0.8 and fixes the issue. |
Performing a test by
ipfs.files.get
on a larger file, such as a 4MB audio file. Secio processes roughtly 7,5MB of data with AES CTR-mode decrypt here https://github.com/libp2p/js-libp2p-secio/blob/master/src/etm.js#L59.This process took 249 seconds on a fresh repo (downloading from another tab), 243 seconds of which was spent in Firefox's garbage collection (v55, 64bit Linux) cleaning up the buffers created for decryption. All the while blocking the main thread.
Whereas Chromium consistently farts out.
This is a profile where the file was offered by https://orbit.chat/ and downloaded by a different tab.
It doesn't cover the entire 249 seconds, as samples were already being discarded before then.
profile-secio.json.zip
The text was updated successfully, but these errors were encountered: