oraoto / pib

PHP in Browser (powered by WebAssembly)
https://oraoto.github.io/pib/
Apache License 2.0
956 stars 112 forks source link

Memory spike on startup #31

Open nikolayemrikh opened 5 years ago

nikolayemrikh commented 5 years ago

Is there any solution to lower memory spike on startup? Currently it spikes up to 3GB, then lowers back to 300MB a few seconds later, but this spike can crush page on weak devices

oraoto commented 5 years ago

Hello, what's your browser?

Currenty, Chromium (76) consumes a lot of memory to optimize WASM, and you can verify this using:

chromium --js-flags="--no-wasm-tier-up"
nikolayemrikh commented 5 years ago

Yes, with this flag there're no memory spike.. Is there any way to resolve this problem without flags? Maybe compile with some other options may help?

Hello, what's your browser?

Literally every browser (FF, Safari, Chromiums)