Replies: 2 comments 2 replies
-
OK. first problem is that micropython does not appear to work with the recipes for file upload and download. This means that having mpy as the main.py means using pyodide workers for a lot more tasks. I assume each will start slow. So maybe this idea of using mpy is not as good as just having a slow starting pyodide main and less workers. Any thoughts on this ? |
Beta Was this translation helpful? Give feedback.
2 replies
-
Javascript/python overhead:Chris Laffra has a demo showing python_javascript argument conversion overhead here:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In the examples there is no demonstration of what appears to be the suggested primary workflow/organisation of files/code.
We see this discussed over time in several places but no extent demo exists.
Ideally there would be three or four templates which a user could use to start from.
Ideal workflow seems to be:
Within this structure its not necessarily clear whether there is a method for moving large amounts of data between js/python so it can be maximally efficient. (e.g. canvas draw calls)
Its also unclear if starting a pyodide worker from inside the
main.mpy
is "better" than starting it in theindex.html
.So I propose the following templates and an example app to exercise them:
Templates:
Example problem
To make an interesting but useful demo I suggest the following structure/tasks:
svg
elements.Image
format to draw them on the canvas4a. the worker makes these into images and draws them directly on the canvas, or
4b. the images get transferred back to main which draws them on the canvas
5a. Could add timing if we wanted to see if one path or another was faster.
A demo like this would show:
There is a start at this here:
Beta Was this translation helpful? Give feedback.
All reactions