Icebug
Graph Analytics optimized for immutable graphs
Icebug is an open-source library for high-performance graph analysis, backed by read-only memory. It is a fork of Networkit with one big idea: an immutable graph, analyzed at full speed — up to 8× faster and 5× leaner than the equivalent analysis on read-write memory.
"Ice = frozen = immutable."
A frozen graph never changes after it is built — no inserts, no deletes, no updates. That single constraint unlocks everything below.
Why immutable?
Adding a million edges one by one is slow. So stop doing it.
A traditional mutable graph stores each node's neighbors in a growable structure — a dynamic array, a linked list, a hash set. Every addEdge(u, v) pays a toll: bounds checks, and sooner or later a reallocation that copies the whole adjacency list to make room. Multiply that by a million edges and you get a million small allocations, a million memcpys, fragmented memory scattered across the heap, and pointer-chasing on every traversal. Locks or index maintenance make it worse in parallel code.
A frozen graph flips the workflow: collect all the edges once, sort them once, and lay them out contiguously in CSR (Compressed Sparse Row) — two flat arrays, indices (every edge's target, size E) plus indptr (where each node's neighbors start, size N+1). After that the graph is never mutated, so:
Cache-friendly scans
Neighbors of a node sit together in one contiguous block of memory — so traversals stream through memory instead of chasing pointers.
Zero-copy sharing
CSR arrays are plain columns, so the same bytes can be handed to Python, DuckDB, or another process via Apache Arrow without copying.
Trivial parallelism
Nobody can mutate the graph mid-algorithm, so OpenMP threads can sweep it with no locks and no defensive copies.
The payoff, per the project's own measurements: up to 5× less CPU and 5× less memory than the equivalent analysis on read-write memory — and far more on build-heavy workloads, as the benchmark below shows. (Icebug still supports mutable graphs through its Networkit heritage — you just don't pay the frozen price when you don't need mutability.)
| icebug | networkit | networkx | |
|---|---|---|---|
| Load | 0.16s | 0.16s | 0.17s |
| Build | 0.37s | 12.27s | 27.31s |
| PageRank | 0.62s | 0.97s | 16.96s |
| Wall | 1.89s | 16.10s | 56.05s |
| Max RSS | 949 MiB | 1.89 GiB | 8.74 GiB |
Same graph, same algorithm. The 33× faster build is the frozen dividend: no per-edge insertion overhead — the CSR is assembled in bulk instead of grown one edge at a time. End to end, icebug finishes in under 2 seconds where NetworkX needs nearly a minute, using roughly a ninth of the memory. Full methodology: Ladybug-Memory/icebug-benchmark-pagerank.
icebug-format
A standard way to store and exchange frozen graphs
A fast engine is only half the story — the graph has to get there without an expensive conversion step. icebug-format is the standardized CSR interchange format shared by the whole ecosystem. It comes in two flavors:
icebug-disk
Parquet files for object storage and persistence. Bring your own node and relationship tables and generate the files with the icebug-format tool.
icebug-memory
Apache Arrow tables for in-process, zero-copy access — hand CSR arrays straight to the engine with no serialization.
Both represent directed graphs in CSR. And importantly: icebug-disk is Parquet + CSR, not a proprietary format — ordinary Parquet files whose columns form standard CSR arrays, consumable by any tool that reads Parquet. While Parquet is the design focus, the approach extends to other Parquet-like columnar formats — Lance is supported starting from 0.23.x.
Query frozen graphs from DuckDB
A DuckDB extension that reads icebug-format graphs, via @ladybugmem:
-- mount an icebug-disk directory as native tables
LOAD icedisk;
SELECT icedisk_attach('my_graph_csr');
-- mounted 4 views: edges_follows, edges_livesin, nodes_city, nodes_user
SELECT * FROM edges_follows; -- (source, target, since), original IDs
SELECT * FROM nodes_user; -- pass-through parquet scan icedisk mounts an icebug-disk v1 directory — CSR Parquet files plus a Cypher schema — as native DuckDB node and edge tables, consuming the indices / indptr Parquet files directly. After attaching, ordinary relational queries — including joins between node and edge tables — just work, as if you were querying the original tables the CSR was built from.
The ecosystem
icebug
The frozen graph analytics library — C++ core with OpenMP parallelism, exposed to Python via Cython. Fork of Networkit, optimized for read-only columnar memory.
github.com/Ladybug-Memory/icebug →icebug-format
The CSR interchange standard — converters and Python APIs that turn DuckDB or Parquet node/edge tables into icebug-disk and icebug-memory graphs.
github.com/Ladybug-Memory/icebug-format →duckdb-icedisk-extension
Query icebug-disk CSR graphs as native DuckDB node/edge tables — attach a directory, get queryable views with original IDs.
github.com/Ladybug-Memory/duckdb-icedisk-extension →icebug-benchmark-pagerank
The reproducible PageRank benchmark behind the numbers above — icebug vs. Networkit vs. NetworkX on cit-Patents.
github.com/Ladybug-Memory/icebug-benchmark-pagerank →Freeze your graph. Feel the speed.
Star the repo and tell all your friends about it.