EuroSciPy 2026

Unpacking parallelising NetworkX algorithms in nx-parallel backend
2026-07-21 , Room 1.19 (Ground Floor, Shannon)

Hi! Have you ever run a NetworkX algorithm on a large graph and watched it take… longer than you expected? You look at your machine, see all those CPU cores sitting idle, and wonder — shouldn’t this be faster?

NetworkX is one of the most widely used graph analysis libraries in Python. But as the graph sizes become more realistic and huge, the performance becomes a bottleneck. So what if we could make NetworkX faster — without rewriting it in C, and without giving up its philosophy?

In this talk, I’ll introduce nx-parallel, a backend that brings multi-core parallelism to NetworkX algorithms with the help of Joblib. But parallelism isn’t just a magic switch you turn on. We’ll dig into what actually makes a graph algorithm embarrassingly parallel, why only certain algorithms qualify, and how design decisions determine whether parallelism truly scales.


We begin by briefly introducing NetworkX. As graph sizes increase and begin to reflect real-world networks, performance becomes a key consideration. This motivates the introduction of nx-parallel as an extension that enables multi-core execution while remaining aligned with the design philosophy of NetworkX.

The discussion then focuses on embarrassingly parallel algorithms in the context of graph analysis—specifically, algorithms whose computations can be decomposed into independent tasks across nodes or edges. This establishes why only certain algorithms are suitable for parallelisation and frames the scope of nx-parallel accordingly.

Next, we outline how these algorithms are parallelised using Joblib, including task partitioning, chunking strategies, the overhead of multiprocessing, and result aggregation. Then, we move on to a key optimization which involves leveraging memory mapping for large NumPy-backed graph data. By storing such data in a memory-mapped format, multiple worker processes can access the same underlying data from disk without duplicating it in memory, thereby reducing overhead for large graphs.

Then, I introduce should_run heuristics, which determine whether parallel execution is beneficial for a given workload, ensuring that parallelism is applied only when appropriate.

Finally, the flow concludes with a small demonstration comparing NetworkX and nx-parallel across different graph sizes, using heatmaps to visualise observed speedups and highlight where parallel execution provides measurable performance improvements.


Expected audience expertise: Domain: none Expected audience expertise: Python: some Project homepage or Git: Project homepage or Git Your relationship with the presented work/project: Active contributor, Maintainer of the presented library/project

I’m Akshita, a Computer Science undergraduate at IIIT Gwalior, and I’m really passionate about building systems that are both technically strong and meaningful in impact. A big part of my journey has been through open source. I also enjoy competitive programming and problem-solving. I’m particularly drawn to spaces where I can learn deeply, collaborate with others, and contribute meaningfully. Beyond tech, I’ve trained in Carnatic music for over 10 years and have won several competitions. Overall, I see myself as someone who takes initiative, brings clarity to a team, and is constantly looking to grow — not just as an engineer, but as someone who can create impact and uplift others along the way :)