Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Move pieces of the Stack into WebWorkers #1195

Closed
daviddias opened this issue Jan 29, 2018 · 5 comments
Closed

Move pieces of the Stack into WebWorkers #1195

daviddias opened this issue Jan 29, 2018 · 5 comments

Comments

@daviddias
Copy link
Member

Tools such as https://github.com/developit/workerize-loader and https://github.com/developit/workerize can make testing WebWorkers processing much simpler and enable us to understand which parts of IPFS could/should be moved into WebWorkers to save processing time.

Ideas that come to mind are the Bitswap Decision Engine, Unixfs-Engine and any Encryption done in JS land.

@daviddias daviddias added exploration status/deferred Conscious decision to pause or backlog labels Jan 29, 2018
@daviddias
Copy link
Member Author

Another module to look at https://github.com/developit/greenlet

@victorb
Copy link
Member

victorb commented Jan 31, 2018

Tasklets seems useful as well: https://github.com/GoogleChromeLabs/tasklets

@daviddias
Copy link
Member Author

@achingbrain @mcollina any experiencing on using a pattern like this to make things faster?

@mcollina
Copy link

I would recommend to generate the certificate in a worker in the browser, as it's a CPU intensive actions that would run for several seconds (unless we can speed it up).

Consider the type of load I've seen from ipfs so far, I don't think there will be any benefit to move part of the flow to a webworker: data needs to be marshalled in/out, and most of the single I/O activity is quite small (there is just a lot of that). What would be of extreme interest is to move all of ipfs into a WebWorker. I would propose to write another module that matches the same public API of ipfs (or a subset), but it runs all the operations in a WebWorker.

@whizzzkid
Copy link

whizzzkid commented May 31, 2023

js-ipfs is being deprecated in favor of Helia. You can follow the migration plan here #4336 and read the migration guide.

This issue has been resolved in Helia! if this does not address your concern please let us know by reopening this issue before 2023-06-05!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Status: Done
Development

No branches or pull requests

4 participants