-
Notifications
You must be signed in to change notification settings - Fork 197
Sync JSON web decoders #1028
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
Sync JSON web decoders #1028
Conversation
In preparation for adding conditional imports to be able to use different encoding/decoding implementation based on the platform, this PR creates an "internal" library and exports some of the important types for encoding/decoding like `FieldInfo`, `PbFieldType` (renamed as `PbFieldTypeInternal`). This syncs some of cl/613649886.
|
@devoncarew PTAL. |
devoncarew
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a few comments; but given:
This syncs the web JSON decoder used internally.
I think we can consider the code reviewed. I think my only blocking comment is that we should update the CI here to test against the vm, dart2js, and dart2wasm.
|
@devoncarew PTAL. We should merge #1031 first, then rebase and merge this one. |
This syncs the web JSON decoder used internally.
The new decoder uses
js_interopinstead of the Dart standard library toimprove performance when compiled to JS.
Benchmarks
master, JS:
PR, JS:
Wasm and VM benchmarks don't change as they keep using the old implementation.
The new implementation is slower with Wasm as it does more JS interop, so we keep using the old one.