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

Convert all Flatbuffer ops to JSON #2801

Closed
ry opened this issue Aug 22, 2019 · 8 comments

Comments

@ry
Copy link
Collaborator

commented Aug 22, 2019

To all contributors who are listening -

We want to convert all of the flatbuffer ops to JSON. Here is a commit showing how to do it. And another.

There's many ops to convert, and if you are interested, this is would be a helpful contribution.

I'm currently working on js/os.ts - please let me know if you want to work on some of the ops, I'll try to coordinate people so there's no double work happening. Base work off #2799

Here is a list of ops we need to convert:

The only ops we are not converting are read, write, readSync, and writeSync.

@bartlomieju

This comment has been minimized.

Copy link
Contributor

commented Aug 22, 2019

I'll take these for a good start:

* compiler.rs
* errors.rs
* fetch.rs
* files.rs
@romainPrignon

This comment has been minimized.

Copy link

commented Aug 22, 2019

I can work on metrics.rs

@bartlomieju

This comment has been minimized.

Copy link
Contributor

commented Aug 22, 2019

I should convert following files tomorrow:

* net.ts
* performance.rs
* permissions.rs
* process.rs
* random.rs
* repl.rs
* resources.rs
* timers.rs
* utils.rs
* workers.rs
@s-panferov

This comment has been minimized.

Copy link

commented Aug 23, 2019

Hello @ry, may I ask why do you want to convert everything to JSON? Did you find it faster than flatbuffers?

@ry

This comment has been minimized.

Copy link
Collaborator Author

commented Aug 23, 2019

@s-panferov actually the opposite - we found flatbuffers too slow and we don’t yet know the speed of this JSON serialization.
We have some ops which are very hot: Deno.read and Deno.write. These we converted to a custom serialization and got some perf increases.

The other ops are not measured in our benchmarks - so we don’t particularly care how fast they are. More important is the ease of implementing and maintaining them. The flatbuffer API is unfortunately very verbose. It also complicated our build at a time when we’re trying to move from gn/ninja to cargo based. So the JSON serialization will help simplify things and not effect the benchmarks.

@bartlomieju

This comment has been minimized.

Copy link
Contributor

commented Aug 23, 2019

@ry I believe io.rs shouldn't be ported - it already uses minimal dispatch

@bartlomieju

This comment has been minimized.

Copy link
Contributor

commented Aug 23, 2019

I think I'm gonna go ahead and port remaining ops from fs.rs

@ry

This comment has been minimized.

Copy link
Collaborator Author

commented Aug 26, 2019

This is complete now thanks to a massive effort from @bartlomieju !

a6f6209
520f963
017f88e
2235dd7
137f337
79f82cf
5b2baa5
bc467b2

@ry ry closed this Aug 26, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4 participants
You can’t perform that action at this time.