prop/rust/prop_grid_rs
Graham McIntire 83aa3115df
perf(rust): intern CellValues keys as Arc<str> to kill per-cell String clones
The decoder's `parse_lola_binary` inserts the same "VAR:LEVEL"
string into ~92k cell maps for every one of ~60 GRIB2 messages in
a chain step — previously a String::clone per cell, yielding
~5.5M heap allocations and frees per hourly run. Switching
`CellValues` from `HashMap<String, f32>` to
`HashMap<Arc<str>, f32>` makes each insertion a single atomic
refcount increment: the string is allocated once per message, and
`Arc::clone` is cheap from there.

Callers were mostly unchanged — `cell.get("...")` still works via
`Arc<str>: Borrow<str>`. Two touch-ups needed: native_duct.rs had
a couple of `cell.get(&format!(...))` lookups that were passing
`&String` (triggering the wrong Borrow impl) — switched to
.as_str(), and the test fixtures' `.insert(format!(...), _)` now
need a `.into()` to coerce into `Arc<str>`. Zero behavior change.
2026-04-21 17:54:44 -05:00
..
src perf(rust): intern CellValues keys as Arc<str> to kill per-cell String clones 2026-04-21 17:54:44 -05:00
tests feat(grid-rs): Rust worker for HRRR f01..f18 propagation chain 2026-04-19 15:42:49 -05:00
.gitignore feat(grid-rs): Rust worker for HRRR f01..f18 propagation chain 2026-04-19 15:42:49 -05:00
Cargo.lock feat(rust): OTLP trace export to cluster OTel Collector 2026-04-20 11:59:49 -05:00
Cargo.toml feat(rust): OTLP trace export to cluster OTel Collector 2026-04-20 11:59:49 -05:00
Dockerfile fix(grid-rs): build wgrib2 in-tree instead of pulling from prop:latest 2026-04-20 08:33:53 -05:00