microsoft / pxt-arcade

Arcade game editor based on Microsoft MakeCode
https://arcade.makecode.com
MIT License
477 stars 206 forks source link

Kiosk app performance #4850

Closed Jaqster closed 1 year ago

Jaqster commented 2 years ago

Sometimes takes a long time to load games...

abchatra commented 1 year ago

@jwunderl if I remember idea was to cache locally right? @aznhassan share page compile should improve this performance too.

jwunderl commented 1 year ago

Right, if we mirror this logic https://github.com/microsoft/pxt-arcade/blob/master/docfiles/script.html#L269, which gets and store builtsimjsinfo (which is the binary js plus a few things) to the call to simulateAsync in pxt/webapp/public/run.html, all we'd need is a flag to post that built code to the parent iframe and to modify the server=1 flag to allow it to also accept a message with builtsimjsinfo, then the kiosk can cache it and itll load almost instantly from then on.