frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Python Workers redux: fast cold starts, packages, and a uv-first workflow

https://blog.cloudflare.com/python-workers-advancements/
64•dom96•2d ago

Comments

jtbaker•2d ago
``` BREAKING CHANGE The following packages are removed from the Pyodide distribution because of the build issues. We will try to fix them in the future: arro3-compute arro3-core arro3-io Cartopy duckdb geopandas ... polars pyarrow pygame-ce pyproj zarr ```

https://pyodide.org/en/stable/project/changelog.html#version...

Bummer, looks like a lot of useful geo/data tools got removed from the Pyodide distribution recently. Being able to use some of these tools in a Worker in combination with R2 would unlock some powerful server-side workflows. I hope they can get added back. I'd love to adopt CF more widely for some of my projects, and seems like support for some of this stuff would make adoption by startups easier.

jeff17robbins•1d ago
The comparison with AWS Lambda seems to ignore the AWS memory snapshot option called "SnapStart for Python". I'd be interested in seeing the timing comparison extended to include SnapStart.
killingtime74•4h ago
"SnapStart for Python" costs extra though. If we are paying then you can even have prewarmed Python lambdas with no cold start on AWS (Provisioned Concurrency).
saikiran-a1•4h ago
nice
BiteCode_dev•3h ago
Anybody using it for something serious ? I can't see a use case beyond I need a quick script running that is not worth setting up a vps.
pedrozieg•2h ago
The most interesting bit here is not the “2.4x faster than Lambda” part, it is the constraints they quietly codify to make snapshots safe. The post describes how they run your top-level Python code once at deploy, snapshot the entire Pyodide heap, then effectively forbid PRNG use during that phase and reseed after restore. That means a bunch of familiar CPython patterns at import time (reading entropy, doing I/O, starting background threads, even some “random”-driven config) are now treated as bugs and turned into deployment failures rather than “it works on my laptop.”

In practice, Workers + Pyodide is forcing a much sharper line between init-time and request-time state than most Python codebases have today. If you lean into that model, you get very cheap isolates and global deploys with fast cold starts. If your app depends on the broader CPython/C-extension ecosystem behaving like a mutable Unix process, you are still in container land for now. My hunch is the long-term story here will be less about the benchmark numbers and more about how much of “normal” Python can be nudged into these snapshot-friendly constraints.

resiros•2h ago
Very interesting but the limitation on the libraries you can use is very strong.

I wonder if they plan to invest seriously into this?

wg0•2h ago
If anyone from cloudflare comes here - it's not possible to create D1 databases on the fly and interact them because databases must be mentioned in the worker bindings.

This hampers the per user databases workflow.

Would be awesome if a fix lands.

ashwindharne•1h ago
I'm always a little hesitant to use D1 due to some of these constraints. I know I may not ever hit 10GB for some of my side projects so I just neglect sharding, but also it unsettles me that it's a hard cap.
dom96•1h ago
(I work at Cloudflare, but not on D1)

I believe this is possible, you can create D1 databases[1] using Cloudflare's APIs and then deploy a worker using the API as well[2].

1 - https://developers.cloudflare.com/api/resources/d1/subresour...

2 - https://developers.cloudflare.com/api/resources/workers/subr...

wg0•1h ago
Thank you! That's great and it is possible but... With some limitations.

The idea is from sign up form to a D1 Database that can be accessed from the worker itself.

That's not possible without updating worker bindings like you showed and further - there is an upper limit of 5000 bindings per worker and just 5000 users then becomes the upper limit although D1 allows 50,000 databases easily with further possible by requesting a limit increase.

edit: Missed opening.

silverwind•2h ago
I wish they would contribute stuff like this memory snappshotting to CPython.
jitl•1h ago
It relies entirely on the WebAssembly runtime, see the discussion of how ASLR problems don’t occur with WASM. Doing this with WASM is pretty easy, doing it with system memory is quite tricky.
scottydelta•1h ago
It’s 2025 and choosing a region for your resources is still an enterprise feature on cloudflare.

In contrast, AWS provides this as the base thing, you choose where your services run. In a world where you can’t do anything without 100s of compliance and a lot of compliances require geolocation based access control or data retention, this is absurd.

NicoJuicy•24m ago
That's basically not how Cloudflare works.

Your app works distributed/globally on the go.

Additionally, every Enterprise feature will become available in time ( discussed during their previous quarter earnings). It will be bound to regions ( eg. Eu)

Size of Life

https://neal.fun/size-of-life/
2051•eatonphil•19h ago•222 comments

A "Frozen" Dictionary for Python

https://lwn.net/SubscriberLink/1047238/25c270b077849dc0/
19•jwilk•1h ago•0 comments

The Cost of a Closure in C

https://thephd.dev/the-cost-of-a-closure-in-c-c2y
78•ingve•3h ago•19 comments

Getting a Gemini API key is an exercise in frustration

https://ankursethi.com/blog/gemini-api-key-frustration/
561•speckx•14h ago•228 comments

Patterns.dev

https://www.patterns.dev/
298•handfuloflight•9h ago•73 comments

Australia begins enforcing world-first teen social media ban

https://www.reuters.com/legal/litigation/australia-social-media-ban-takes-effect-world-first-2025...
787•chirau•1d ago•1196 comments

Booting Linux in QEMU and Writing PID 1 in Go to Illustrate Kernel as Program

https://serversfor.dev/linux-inside-out/the-linux-kernel-is-just-a-program/
113•birdculture•6d ago•32 comments

How the Brain Parses Language

https://www.quantamagazine.org/the-polyglot-neuroscientist-resolving-how-the-brain-parses-languag...
26•mylifeandtimes•2d ago•6 comments

Auto-grading decade-old Hacker News discussions with hindsight

https://karpathy.bearblog.dev/auto-grade-hn/
453•__rito__•17h ago•205 comments

Why Startups Die

https://www.techfounderstack.com/p/why-startups-die
13•makle•3d ago•5 comments

Python Workers redux: fast cold starts, packages, and a uv-first workflow

https://blog.cloudflare.com/python-workers-advancements/
64•dom96•2d ago•15 comments

Go's escape analysis and why my function return worked

https://bonniesimon.in/blog/go-escape-analysis
11•bonniesimon•6d ago•6 comments

VCMI: An open-source engine for Heroes III

https://vcmi.eu/
109•eamag•4d ago•14 comments

How Google Maps allocates survival across London's restaurants

https://laurenleek.substack.com/p/how-google-maps-quietly-allocates
272•justincormack•2d ago•131 comments

Incomplete list of mistakes in the design of CSS

https://wiki.csswg.org/ideas/mistakes
123•OuterVale•6h ago•74 comments

Rubio stages font coup: Times New Roman ousts Calibri

https://www.reuters.com/world/us/rubio-stages-font-coup-times-new-roman-ousts-calibri-2025-12-09/
285•italophil•1d ago•479 comments

Super Mario 64 for the PS1

https://github.com/malucard/sm64-psx
233•LaserDiscMan•16h ago•91 comments

Fossils reveal anacondas have been giants for over 12 million years

https://www.cam.ac.uk/stories/twelve-million-years-of-giant-anacondas
49•ashishgupta2209•1w ago•21 comments

Qwen3-Omni-Flash-2025-12-01:a next-generation native multimodal large model

https://qwen.ai/blog?id=qwen3-omni-flash-20251201
270•pretext•19h ago•95 comments

Show HN: Wirebrowser – A JavaScript debugger with breakpoint-driven heap search

https://github.com/fcavallarin/wirebrowser
31•fcavallarin•20h ago•8 comments

Show HN: Automated license plate reader coverage in the USA

https://alpranalysis.com
182•sodality2•17h ago•105 comments

Flow Where You Want – Guidance for Flow Models

https://drscotthawley.github.io/blog/posts/FlowWhereYouWant.html
19•rundigen12•5d ago•1 comments

McDonald's removes AI-generated ad after backlash

https://www.theguardian.com/business/2025/dec/11/mcdonalds-removes-ai-generated-christmas-ad-adve...
7•terabytest•22m ago•1 comments

Common Lisp, ASDF, and Quicklisp: packaging explained

https://cdegroot.com/programming/commonlisp/2025/11/26/cl-ql-asdf.html
84•todsacerdoti•1d ago•20 comments

Scientists create ultra fast memory using light

https://www.isi.edu/news/81186/scientists-create-ultra-fast-memory-using-light/
99•giuliomagnifico•6d ago•24 comments

Valve: HDMI Forum Continues to Block HDMI 2.1 for Linux

https://www.heise.de/en/news/Valve-HDMI-Forum-Continues-to-Block-HDMI-2-1-for-Linux-11107440.html
740•OsrsNeedsf2P•17h ago•411 comments

3D-printed carotid artery-on-chips for personalized thrombosis investigation

https://advanced.onlinelibrary.wiley.com/doi/10.1002/adma.202508890
20•PaulHoule•1w ago•2 comments

Terrain Diffusion: A Diffusion-Based Successor to Perlin Noise

https://arxiv.org/abs/2512.08309
129•kelseyfrog•16h ago•38 comments

Gundam is just the same as Jane Austen but happens to include giant mech suits

https://eli.li/gundam-is-just-the-same-as-jane-austen-but-happens-to-include-giant-mech-suits
218•surprisetalk•1w ago•147 comments

Is it a bubble?

https://www.oaktreecapital.com/insights/memo/is-it-a-bubble
244•saigrandhi•17h ago•378 comments