Problem
Row::parse validates a row by cloning it and iterating the clone fully, and then the host iterates the row again to actually consume the values. Every row is decoded twice.
Why it matters
For any workload with a non-trivial number of rows or wide rows, this is a flat 2x decode cost paid on every single result set, purely from the validation strategy Row::parse chose. Perry's P7 lane (turnloop-mysql, for mysql2) flagged this while building the row-materialization path.
What would fix it
A validating iterator that can be consumed once — validate-as-you-go rather than validate-then-iterate-again — would remove the duplicated decode work without changing the crate's safety guarantees.
Problem
Row::parsevalidates a row by cloning it and iterating the clone fully, and then the host iterates the row again to actually consume the values. Every row is decoded twice.Why it matters
For any workload with a non-trivial number of rows or wide rows, this is a flat 2x decode cost paid on every single result set, purely from the validation strategy
Row::parsechose. Perry's P7 lane (turnloop-mysql, formysql2) flagged this while building the row-materialization path.What would fix it
A validating iterator that can be consumed once — validate-as-you-go rather than validate-then-iterate-again — would remove the duplicated decode work without changing the crate's safety guarantees.