On Sat, Jan 28, 2023 at 11:43 PM Damon Lei <danxiong...@gmail.com> wrote:

> Hi,
> We tested the WasmSnapshot solution in the production environment.
> 1. Tested with more than 500,000 users, no user feedback has been found so
> far
> 2. It takes 2 seconds to optimize the startup time. Before optimization,
> the game startup takes about 10s. On Android, the optimization is 13.6%,
> and the iOS optimization is 22.2%
>
> This solution works very well, and I want to document this solution on
> Emscrpten's documentation, such as this “link
> <https://emscripten.org/docs/optimizing/Optimizing-Code.html#unsafe-optimizations>
>  (Emscripten/OptimizingCode/UnsafeOptimize)”
> (or some other documents), so that more people know that this method is
> feasible.
>
> What do you think of this?
>

If you think this is something that could be upstreamed into emscripten
itself, then maybe create PR to start adding support?

if it's just a matter of documentation you technique then perhaps we could
start by adding a wiki page here:
https://github.com/emscripten-core/emscripten/wiki/_pages


> Thanks,
> 在2022年12月22日星期四 UTC+8 23:30:40<s...@google.com> 写道:
>
>> Hi Damon
>>
>> This sounds really great.  When you say "Wasm Snapshot" are you talking
>> about some tool that you wrote yourself or some existing tool such as
>> wizer?  Would you be interested in contributing this tool to emscripten, or
>> perhaps some documentation on how to go about doing this?
>>
>> cheers,
>> sam
>>
>> On Thu, Dec 22, 2022 at 7:23 AM Damon Lei <danxi...@gmail.com> wrote:
>>
>>>
>>> Hi
>>>
>>> I am trying to use the Wasm Snapshot to reduce the startup time, and it
>>> succeeded. Wasm Apps run correctly, reducing startup time by 20-50%.
>>>
>>> My job is to help developers export Unity games to webgl mode to run on
>>> our App (WeChat in China).
>>> Unfortunately, after exports, wasm callMain is very slow, taking an
>>> average of 5 seconds.
>>>
>>> So I spent a few months experimenting with the Wasm Snapshot solution,
>>> which means, take a snapshot of Wasm App during development.
>>> At runtime, callMain is no longer executed, but a snapshot.data is
>>> downloaded and restored. The snapshot.data includes Wasm Memory, FS, GL,
>>> and other JS States.
>>> At the same time, I will cut out the data in wasm and some resources of
>>> Unity's res-bundle, because they are no longer needed.
>>>
>>> In the 5 Unity games tested, no problems were found. Startup
>>> time-consuming optimization is considerable.
>>>
>>> The snapshot.data size is about 4MB after compression(brotli).
>>> The optimization is about 2-5sec (20%-50%). See the end for specific
>>> data.
>>>
>>> Wasm Snapshot is an awesome solution, and I want you to know that it
>>> really works.
>>> At the same time, I would like to know whether the startup is a common
>>> problem? And can it be used as a new feature of Emscripten to benefit more
>>> users?
>>>
>>> [image: 截屏2022-12-22 17.34.57.png]
>>>
>>> --
>>> 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 emscripten-disc...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/emscripten-discuss/cdaeda97-f40f-42ac-8194-2bb771d49aebn%40googlegroups.com
>>> <https://groups.google.com/d/msgid/emscripten-discuss/cdaeda97-f40f-42ac-8194-2bb771d49aebn%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
> 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 emscripten-discuss+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/emscripten-discuss/47c58803-33fc-44d5-95ae-29f98e9b3dban%40googlegroups.com
> <https://groups.google.com/d/msgid/emscripten-discuss/47c58803-33fc-44d5-95ae-29f98e9b3dban%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 emscripten-discuss+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/CAL_va2_pzWqy217ZxYkO4VWQJcfktn2em4QKqo6aeXTu4t7jtg%40mail.gmail.com.

Reply via email to