-
Notifications
You must be signed in to change notification settings - Fork 42
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
Use proto library that provides tree-shakeable code #335
Comments
With protobufjs it's possible to build without bufbuild https://github.com/filoozom/tfe-uliege-code/tree/main/platform%2Fnode |
I've also detected that generated files are not tree-shakeable, leaving a lot of unused code in the final bundle. See more: status-im/status-web#233. I will investigate, whether there are some possibilities to optimize. |
Maintenance has been resumed 🎉 ipfs/protons@74d3b7a Focusing this issue in the tree-shakeable problem. |
protons
with another packageBuffer
Buffer
Protons is facing some performance issues: ipfs/protons#51 Focus of this issue is still to have a tree-shakeable protbuf code. Whether we use |
Need to check if |
Do note status-im/status-web#337 |
Most of the work done here: #1196 Peer exchange still pending: waku-org/waku-proto#14 |
Based on #1245, it can be deduced that cc @fryorcraken |
Ok seems that in terms of bundle size, it does not help. Noting that this issue is specifically about bundle size (tree shakeable code) it would make sense to keep protons. |
Correct. Would this mean we are closing this issue with the above findings? |
As a followup to the above thread: One idea that came up in a discussion with @felicio was if we could have the Logos scaling simulation tests run js-waku with both protobuf libraries and see some real-world statistics for sending/receiving messages at scale with both libraries. Turns out it will take some work to make js-waku work with the Logos simulation test (ref: https://discord.com/channels/973324189794697286/1047940460791996446/1088787192870096978) Curious to know your thoughts if it is worth it @fryorcraken |
Yes this is a fair idea. But not for 2023 https://notes.status.im/Uz9HeCwZTDSYyOq36Q54cA?edit I'd suggest to open a different issue and park it. |
Sounds good :) Future work being tracked here: #1294 |
Problem
ts-proto
generate code that is not tree-shakeable. See status-im/status-web#233This is an issue as it inflate the package size for library consumers.
It also uses
Buffer
.Solution
Possibly investigate using
ipfs/protons
orprotobuf-js
directly.Definition of Done
Bonus
js-waku currently uses bufbuild and ts-proto which has several downsides:
Buffer
It also has pros:
Review whether we can use the solution for the examples in js-waku too.
The text was updated successfully, but these errors were encountered: