Performance & scale

Spatial indexes, parallelism, memory, and datasets too big to load at once.

Two cost curves: a fix that changes the constant against one that changes the complexity class. only one kind of fix changes the shape of the curveno index — n × man index — n log mrowstimeVectorising, parallelising and chunking all move the red line down; only an index bends it

There are only four reasons spatial code is slow, and the fixes are not interchangeable. Python-level iteration, a missing spatial index, I/O and parsing, and memory pressure each look like the others from the outside, so the first move is always a measurement rather than a guess.

One of the four is different in kind. Vectorising, parallelising and chunking all reduce the constant: the work still grows with the data, just less steeply. An index changes the complexity class — a spatial join goes from comparing every pair to comparing each feature with a handful of candidates — and that is the only fix that turns an impossible job into a possible one rather than a slow one into a faster one.

The pages below cover the four bottlenecks, how to tell which you have, and the techniques for each: indexes, vectorisation, parallelism, chunking and out-of-core formats.

Learning paths run through this topic too — see the end of this page.

🧭 Start with the concepts

The ideas the how-to guides below assume you already have.

Show every concept in this topic

⚙️ Then do the task

Step-by-step walkthroughs with code you can copy and adapt.

Show every how-to guide in this topic

🔧 When it breaks

The errors this topic produces, with the cause explained rather than just the command.

Show every fix in this topic

Related topics

Subjects that keep coming up alongside this one, most overlap first.

Keep browsing

Performance & scale sits in Production. Every topic on the site is listed on the topics index.