Comment by dom96
3 hours ago
(I'm one of the authors of this post)
> Being tied to use only one version of Python/Pyodide (the one that Workerd embeds)
This isn't quite the case, you can choose between different versions using compatibility flags. For example, `python_workers_314` is the compat flag for Python 3.14[1]. You've also got compat flags for 3.13 and 3.12. Though it is worth noting that by using those older versions you will also be using older Pyodide versions too, which have fewer features (for example they lack JSPI support).
> Architecturally tied to the JS/v8 world, which may show some challenges as they aim to reduce cold start times
That is indeed a challenge. But our memory snapshot implementation has improved the cold starts significantly already and we will be working to reduce these even further. We also have sharding these days which reduces cold start frequency a lot. We wrote about cold starts (and sharding) in a previous blog post[2] which includes some numbers.
1 - https://developers.cloudflare.com/workers/configuration/comp...
2 - https://blog.cloudflare.com/python-workers-advancements/
Thanks for chiming in!
> it is worth noting that by using those older versions you will also be using older Pyodide versions too
Yeah, I think this summarizes properly the issue I mentioned. Basically compat flags are a global version that affects not only the Python version used but workerd as well. I believe you'll see some architectural issues from this design. Following up on your example, users will not be able to use a previous version of Python that has JSPI included, unless you update the old workerd as well (please correct me if I'm wrong), which will make certain things a challenge as workerd evolves.
> We wrote about cold starts (and sharding) in a previous blog post[2] which includes some numbers
Thanks for sharing. On that blogpost [2] Cloudflare Python Workers startup time was reported to be about 1.027 seconds, which is way behind the numbers we have at Wasmer for cold starts in Python apps (60ms, or 16x faster). That's why I was asking if you guys remeasured and have better timings now :)