bench(perf-matrix): FlatGeobuf and GeoPackage writes against GDAL #1435
All Vouch review confidence checks passed
Residual risk 0.33 = Change Risk (0.48) × (1 − Review Confidence (0.31)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.48 · 554 lines diff across 6 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 56% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.378
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #1435"
general
weight: 0.35
coderabbitai[bot]
The performance matrix (
scripts/perf_matrix.py) now compares terrio's FlatGeobuf and GeoPackage writes with GDAL's: two formats,flatgeobuf-writeandgeopackage-write, write the GeoParquet fixtures (400,000 polygons or lines, 2,000,000 points) withterrio.write_vectorand with GDAL 3.13.3, and compare every output with GDAL's feature by feature./perf-matrix flatgeobuf-writeand/perf-matrix geopackage-writerun them on a pull request; likegeoparquet-write, the default/perf-matrixleaves them out.Part of #1274 (Writes: "FlatGeobuf, GeoPackage").
What was added
FlatGeobufWriteandGeoPackageWrite, subclasses ofGeoParquetWrite, whose methods now take the driver, output extension, creation options and comparison from the class (DRIVER,GDAL_FORMAT,OUT,LCO,compare). GeoParquet writes are unchanged.geom), so GDAL is givenSPATIAL_INDEX=YES, andGEOMETRY_NAME=geomfor GeoPackage. Timing is the write call's, from the source loaded in memory beforehand (terrio.open_vector, a GDALMEMcopy), as for GeoParquet writes.benchmark_validation.compare_vectors), then whether both outputs have a spatial index (OLCFastSpatialFilter). A GeoPackage records its write time (gpkg_contents.last_change), so its outputs never share bytes and every sample is compared.PATHSentries for both,perf-matrix.ymlaccepts both by name,docs/benchmarks.mddescribes them; a test checks the comparison (equal files, a changed attribute, an output without the index GDAL writes).Results
--samples 3on an i9-14900K (32 CPUs, 61 GB, Linux), terrio 0.10.0 (release wheel ofmainat 9192c841), GDAL 3.13.3, 4 threads. The machine was shared with other work (/proc/loadavg25–31), so time ratios are provisional; output equality is not.All 6 cases are
exact: every feature, field and CRS equal to GDAL's output, both with a spatial index.| Case | terrio ms | GDAL ms | terrio/GDAL | Output KiB t/G | Peak RSS MB t/G |
|---|---:|---:|---:|---:|---:|
| FlatGeobuf polygon | 662 | 754 | 0.88 | 147,458 / 147,459 | 1,266 / 773 |
| FlatGeobuf point | 3,179 | 3,911 | 0.81 | 299,847 / 299,848 | 1,948 / 1,156 |
| FlatGeobuf line | 717 | 713 | 1.01 | 141,208 / 141,209 | 1,205 / 695 |
| GeoPackage polygon | 788 | 663 | 1.19 | 149,244 / 157,420 | 1,781 / 666 |
| GeoPackage point | 1,741 | 2,536 | 0.69 | 197,192 / 237,580 | 2,714 / 1,017 |
| GeoPackage line | 648 | 639 | 1.01 | 140,736 / 148,908 | 1,713 / 585 |
Geometric mean terrio/GDAL: FlatGeobuf 0.90, GeoPackage 0.94. Peak RSS includes the source held in memory, which is larger as a
terriolayer than as GDAL'sMEMdataset: terrio peaks at 1.6–2.9x GDAL's memory.Limitations
/perf-matrixruns with the base branch's harness, so it measures these formats on pull requests after this one is merged.Validation
pytest scripts/tests/test_perf_matrix.py(GDAL 3.13.3 environment): 112 passed.🤖 Generated with Claude Code
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
New Features
Performance benchmarks now cover writing FlatGeobuf and GeoPackage files, including spatial-index checks and comparisons with GDAL.
The
/perf-matrixcommand accepts FlatGeobuf and GeoPackage write formats by name. Default runs continue to exclude vector writes.Documentation
* Updated benchmark guidance with instructions and details on timing and comparing the new write formats.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->