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

[wasm] More typescript conversion #59655

Merged
merged 4 commits into from
Oct 4, 2021
Merged

Conversation

pavelsavara
Copy link
Member

@pavelsavara pavelsavara commented Sep 27, 2021

  • flattened typescript folders
  • original binding_support.js and binding_support.js split into multiple TS files
  • clarified exports for MONO, BINDING and linking
  • linking js to C methods is generated during emcc module loading, which is evaluated during compilation
  • only one emscripten library file library-dotnet.js

@pavelsavara pavelsavara added the arch-wasm WebAssembly architecture label Sep 27, 2021
@pavelsavara pavelsavara added this to the 7.0.0 milestone Sep 27, 2021
@pavelsavara pavelsavara requested a review from kg September 27, 2021 16:27
@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.

@ghost
Copy link

ghost commented Sep 27, 2021

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

Issue Details

work in progress

Author: pavelsavara
Assignees: -
Labels:

arch-wasm

Milestone: 7.0.0

@pavelsavara pavelsavara changed the title [draft][wasm] More typescript conversion [wasm] More typescript conversion Sep 30, 2021
@pavelsavara
Copy link
Member Author

The new dotnet.xxx.js is 45099 bytes smaller :-)

image

@pavelsavara
Copy link
Member Author

Perf test: src\mono\sample\wasm\browser-bench

measurement old time new time
Exceptions, NoExceptionHandling 0.2106us 0.2094us
Exceptions, TryCatch 0.2246us 0.2220us
Exceptions, TryCatchThrow 0.0083ms 0.0086ms
Exceptions, TryCatchFilter 0.1729us 0.1701us
Exceptions, TryCatchFilterInline 0.0326us 0.0314us
Exceptions, TryCatchFilterThrow 0.0095ms 0.0098ms
Exceptions, TryCatchFilterThrowApplies 0.0089ms 0.0090ms
Json, non-ASCII text serialize 0.5308ms 0.5361ms
Json, non-ASCII text deserialize 1.5531ms 1.5450ms
Json, small serialize 0.1226ms 0.1171ms
Json, small deserialize 0.1979ms 0.1967ms
Json, large serialize 32.2857ms 31.5786ms
Json, large deserialize 51.9556ms 53.4719ms
WebSocket, PartialSend 1B 0.0016ms 0.0018ms
WebSocket, PartialSend 64KB 0.1057ms 0.1035ms
WebSocket, PartialSend 1MB 1.6000ms 1.8636ms
WebSocket, PartialReceive 1B 0.0031ms 0.0031ms
WebSocket, PartialReceive 10KB 0.0080ms 0.0100ms
WebSocket, PartialReceive 100KB 0.0100ms 0.0100ms

My conclusion - no change.

@pavelsavara pavelsavara marked this pull request as ready for review September 30, 2021 15:26
@thaystg
Copy link
Member

thaystg commented Sep 30, 2021

Debugger tests are working :)

src/mono/wasm/runtime/debug.ts Outdated Show resolved Hide resolved
src/mono/wasm/runtime/debug.ts Outdated Show resolved Hide resolved
src/mono/wasm/runtime/library_mono.js Outdated Show resolved Hide resolved
src/mono/wasm/runtime/method-binding.ts Outdated Show resolved Hide resolved
- flattened typescript folders
- binding_support.js split into multiple TS files
- clarified exports
- binding js methods to linker is generated during emcc module loading
- types:
Co-authored-by: Daniel Genkin <[email protected]>
src/mono/wasm/runtime/cs-to-js.ts Outdated Show resolved Hide resolved
src/mono/wasm/runtime/cwraps.ts Outdated Show resolved Hide resolved
src/mono/wasm/runtime/cwraps.ts Outdated Show resolved Hide resolved
src/mono/wasm/runtime/cwraps.ts Outdated Show resolved Hide resolved
src/mono/wasm/runtime/event-listener.ts Outdated Show resolved Hide resolved
src/mono/wasm/runtime/event-listener.ts Outdated Show resolved Hide resolved
src/mono/wasm/runtime/strings.ts Outdated Show resolved Hide resolved
src/mono/wasm/runtime/strings.ts Outdated Show resolved Hide resolved
src/mono/wasm/runtime/strings.ts Outdated Show resolved Hide resolved
src/mono/wasm/runtime/strings.ts Outdated Show resolved Hide resolved
src/mono/wasm/runtime/strings.ts Outdated Show resolved Hide resolved
src/mono/wasm/runtime/web-socket.ts Outdated Show resolved Hide resolved
src/mono/wasm/runtime/web-socket.ts Outdated Show resolved Hide resolved
src/mono/wasm/runtime/web-socket.ts Outdated Show resolved Hide resolved
src/mono/wasm/runtime/web-socket.ts Outdated Show resolved Hide resolved
@pavelsavara pavelsavara requested a review from kg October 1, 2021 11:25
@pavelsavara
Copy link
Member Author

There is unrelated stack overflow in System.Runtime.Serialization.Xml.Tests see #59926

@pavelsavara pavelsavara merged commit e332aa0 into dotnet:main Oct 4, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Nov 3, 2021
@pavelsavara pavelsavara deleted the wasm_ts5 branch January 4, 2022 13:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants