Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upMove SHA1 hashing to another process/worker #235
Comments
This comment has been minimized.
This comment has been minimized.
|
Transferrable objects worked well for Bitford:
You're always welcome to copy my code for groundwork. We're implementing file-sharing here anyway. :-) |
This comment has been minimized.
This comment has been minimized.
|
It is not clear to me how to integrate this into the browserify process. Maybe with workerify? |
This comment has been minimized.
This comment has been minimized.
|
Managed to make Before:
After:
Total time for 250MB file almost cut in half. 13s to 7s. |
This comment has been minimized.
This comment has been minimized.
|
With this PR (michaelrhodes/simple-sha1#1) to |
This comment has been minimized.
This comment has been minimized.
|
Aaaand, using the web crypto API gets us down to <1 second to seed a 250MB file! PR out: michaelrhodes/simple-sha1#3 We're now officially in the territory of C speeds. We probably can punt on web workers for a while. This is so much faster than it was before (13.7 seconds). |
This comment has been minimized.
This comment has been minimized.
|
Released 0.22.0 using |
This comment has been minimized.
This comment has been minimized.
|
@FerrOS This is amazing! Really needed! We should try to push the larger BitTorrent client developers to implement WebRTC as WebTorrent is revolutionary to BitTorrent! |
This comment has been minimized.
This comment has been minimized.
|
@Svenskunganka Yep, we need to apply pressure and/or send them pull requests that add WebRTC support. Do you know any client developers? |
This comment has been minimized.
This comment has been minimized.
|
@FerrOS Unfortunately not. As for µTorrent, it seems the only thing we can do there is to make a feature request on their forums... |
This comment has been minimized.
This comment has been minimized.
|
we could also try the other way around: create a desktop and mobile app with node.js/Meteor. Like Atom.io did. It's not very difficult. Being desktop based, I could create a bridge between the standard torrent protocol and webtorrent, using Unix Pipes on linux. |
This comment has been minimized.
This comment has been minimized.
|
@servermeta that won't cut it in the long run as people are still going to use µTorrent, Transmission, Vuze and all the other large BitTorrent clients. The only way to get to the large audience is if those clients adds support for WebRTC. I imagine only seedbox users would be interested in using a bridge. |
This comment has been minimized.
This comment has been minimized.
|
the idea is to substitute them (exaggerated expectation). We could have the momentum, as webtorrent is firewall proof. |
This comment has been minimized.
This comment has been minimized.
They seem to be quite active with the responses though, so I believe they are reading the requests. A while ago I was already writing a request there, but then I hesitated, since I don't know if that is on the agenda at this point. I thought it might be better to wait for the BEP and other such things that might persuade them, or help with integrating WebRTC (examples?) that are still pending. What do you think? |
This comment has been minimized.
This comment has been minimized.
|
@MzHub maybe we can open their eyes with Feross awesome presentation from JSConf Asia? https://www.youtube.com/watch?v=kxHRATfvnlw It's very educational and really brings forth the weight and importance of WebRTC support! |
This comment has been minimized.
This comment has been minimized.
|
just passing through but npm webworker-threads might be of interest |
This comment has been minimized.
This comment has been minimized.
|
did you see? |
This comment has been minimized.
This comment has been minimized.
|
It looks like threads.js ( However, it doesn't provide the ability to use |
This comment has been minimized.
This comment has been minimized.
|
Closing this. See: #1233 (comment) for reasoning. |
Creating SHA1 hashes for large multi-gigabyte files can take up a lot of CPU time.