gristlabs / grist-desktop

Desktop Grist, packaged with Electron
Apache License 2.0
166 stars 7 forks source link

update pyodide sandbox version #8

Closed paulfitz closed 1 year ago

paulfitz commented 1 year ago

Use latest grist-core, which has significant improvements to the pyodide sandbox packaging. The main advantages are less delay before a document becomes editable, and less delay at the start of imports.

paulfitz commented 1 year ago

@alexmojaki do you happen to know if there's an easy way to pick up the standard-library-as-pyc variant? Would it be worth it? Pyodide is currently used like this: https://github.com/gristlabs/grist-core/blob/d12d971162c451dd6fb0b42878f2aec50a351e8f/sandbox/pyodide/pipe.js#L4

alexmojaki commented 1 year ago

Try loadPyodide({indexURL: 'https://cdn.jsdelivr.net/pyodide/v0.23.0/pyc/', ...})

paulfitz commented 1 year ago

Try loadPyodide({indexURL: 'https://cdn.jsdelivr.net/pyodide/v0.23.0/pyc/', ...})

Would this introduce a new dependency on the network being available, or is that dependency already there in pyodide?

alexmojaki commented 1 year ago

I think it would. Does grist-electron work offline?

paulfitz commented 1 year ago

Yes, grist-electron works offline, and that is a useful property in a desktop app. So I'll skip the standard-library-pyc part for now.