//! Deep memory compaction for long-lived planner data.
//!
//! Planner data is built with growable collections and then kept in caches.
//! These collections may keep unused capacity after construction or filtering.
//! Before caching, we recursively shrink owned vectors to reduce retained memory.
//!
/// Recursively releases unused capacity in a value and its children.
/// Shrink each item first, then shrink the vector