@MartinaKraus11
@MartinaKraus11
Time to interact
Initial loading time
Execution speed
@MartinaKraus11
@MartinaKraus11
@MartinaKraus11
GDE in Angular
Women Techmakers Ambassador
Trainer and Consultant
@MartinaKraus11
@MartinaKraus11
@MartinaKraus11
@MartinaKraus11
https://www.thinkwithgoogle.com/marketing-strategies/app-and-mobile/mobile-page-speed-new-industry-benchmarks/
@MartinaKraus11
C / C++
Rust
Go
IR
WASM
JS
@MartinaKraus11
C / C++
Rust
Go
IR
WASM
JS
@MartinaKraus11
@MartinaKraus11
> wasm-opt in.wasm -o final-bundle.wasm
@MartinaKraus11
@MartinaKraus11
@MartinaKraus11
@MartinaKraus11
@MartinaKraus11
@MartinaKraus11
@MartinaKraus11
@MartinaKraus11
DEMO
https://webassembly.github.io/binaryen/shrink.html
@MartinaKraus11
Integrated Optimizations:
-O0, -O1, -O2, -O3, -O4: execute different amount of optimization passes
-Os: focusing on code size
-Oz: focusing on speed
@MartinaKraus11
@MartinaKraus11
C / C++
Rust
Go
IR
WASM
JS
@MartinaKraus11
C / C++
Rust
Go
IR
WASM
JS
Frontend Compiler:
@MartinaKraus11
@MartinaKraus11
Using inline JavaScript / WebAPIs:
@MartinaKraus11
C / C++
Rust
Go
IR
WASM
JS
@MartinaKraus11
Focusing on WASM in the Browser:
-s ENVIRONMENT=web: remove code not needed for the web
--closure 1: reducing the size of the support JavaScript code
Profiling first
Know your tools
Use wasm-opt to shrink the bundle-size
Reduce the initial loading time
@MartinaKraus11
me@martina-kraus.io
@MartinaKraus11
martina-kraus.io
Ping me:
Slides: slides.com/martinakraus/webassembly