So I have two builds of my program, a game engine, one where it's a single 
37mb wasm file (5mb br compressed).

With my game engine, I use all threads available on my machine via 
Navigator.hardwareConcurrency (32). This works fine, as only the .js files 
are duplicated and my game starts up on my machine within 1-2 seconds with 
~700ms of that been fetching and initializing the .js and wasm file and the 
remaining been engine + game startup time.

Now, I've started experimenting with hot reloading parts of my engine, to 
do this I've decided to use shared libraries and this has produced about 
120 libraries around a few hundred KB and a couple libraries that are 11MB, 
17MB. This has made the total size a little larger, around 42mb (6mb 
compressed), the size is not the issue though.

Now that the code is split among many wasm modules, emscripten is loading 
up each library (125 modules or 42mb) * threads (32), resulting in 1.3gb of 
code been downloaded and instantiated.

Is there currently a way to do what I'm trying to achieve in an efficient 
way, or would I have to modify emscripten for this purpose?

Also, slightly related, I can understand the worker.js files needing to 
match the threads, but is there not a way around the fetching of the extra 
non worker .js files?

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/be441453-c1e7-465d-88eb-3b0e9531e670n%40googlegroups.com.

Reply via email to