-
Notifications
You must be signed in to change notification settings - Fork 1.5k
worker export functions #2315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
do you have a valid use case for enabling that via |
should be in pyscript/docs i guess as warning, no case anymore - moved to |
@Ridensium I have been working on getting workers to work for me. I would like to use Pyworker because I can initiate it entirely from within python. (not possible with named workers) |
the pyodide bootstrap is the bottleneck ... once that happens everything is at same speed as before. if you start earlier workers manually you risk to start pyodide twice, something named workers should avoid when the |
Yes the bootstrap is an issue for me. I can use The main problem for me however is not the booting time. I can see why you would want to do that for Named workers. The ONLY reason I was looking at Pyworker is to do with UI components. No real problem to use named workers instead but I hope you can see that its easier to manage complex sets of components if they are truly independent of each other and main.py. |
@Neon22 I decided to use only PyWorker too as preferring keep things pytonic as much possible. If your case is just to make UI reactive why not use micropython instead pyodide, as it's much faster in startup. You can also use asyncio if the code isnt so cpu hungry. Will check examples tomm. |
@Ridensium yes mpy is my preferred but if I need to use configparser or somesuch - not available in mpy. Also some js module stuff doesn't work like base64 which I need for svg to image manipulations. I'm working on all the limitations in hopes of getting a full list for the devs. I can see why usng Pyworker can be bad though. You don;t want to reload entire pyodide more than once |
__ export __ = […] in module seems working only when made with <script> but not with PyWorker, to be added as hint in the documentation
The text was updated successfully, but these errors were encountered: