Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[spike] Prioritize caveats for browser usage #527

Closed
6 tasks
D4nte opened this issue Feb 15, 2022 · 4 comments
Closed
6 tasks

[spike] Prioritize caveats for browser usage #527

D4nte opened this issue Feb 15, 2022 · 4 comments

Comments

@D4nte
Copy link
Contributor

D4nte commented Feb 15, 2022

Problem

See #337.

There a number of actions to be taken to resolve #337. Some action may be low efforts. Other actions may lead to do upstream changes in dependencies.

It is uncertain what items should be prioritized.

Solution

Goals

  1. Make it more accessible
  2. Make it performant

Outline

Analyze js-waku and its dependencies to prioritize the work, find the low hanging fruits and most bang for buck actions.

  • What actions would reduce the bundle size the most?
  • Which polyfill is the easiest to remove?
  • Which polyfill removal would also assist with bundle size reduction or installation reduction? (as I don't think polyfills are bundled)
  • Which are the biggest dependencies? Do themselves have an intelligent bundling strategy? Do they import too much? e.g. node-forge and libp2p libs

Definition of Done

Non exhaustive:

  • List dependencies by size
  • List which dependencies requires a polyfill. Do they bring the polyfill or do they bring a dependency with a polyfill itself?
  • Check if test_utils is bundled (should not be)
  • List polyfill sizes
  • Can we shim polyfills?
  • Propose action plan, write it in Optimize js-waku for the Browser #337
@D4nte
Copy link
Contributor Author

D4nte commented Feb 15, 2022

Note that it may be useful to bundle the polyfills. This would improve UX and also make it easier to measure their size and get clear metrics.

@D4nte
Copy link
Contributor Author

D4nte commented Feb 15, 2022

https://bundlephobia.com/package/[email protected] elliptic might be a good candidate

@D4nte
Copy link
Contributor Author

D4nte commented Feb 17, 2022

Consider https://github.com/Richienb/node-polyfill-webpack-plugin to remove having to setup polyfills

@D4nte D4nte changed the title Prioritize caveats for browser usage [spike] Prioritize caveats for browser usage Feb 21, 2022
@fryorcraken
Copy link
Collaborator

Polyfills have been removed, this spike is not needed anymore. continue to track the work with #337

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants