abonander commented on issue #4428: URL: https://github.com/apache/arrow-adbc/issues/4428#issuecomment-4851403629
The problem is that even in scenario one, there's _another_ copy that happens in the Rust side of the FFI: https://github.com/apache/arrow-adbc/blob/d63158da6f35867763d4b5a38476fd38f9e478e2/rust/ffi/src/driver_exporter.rs#L571 `value.into()` there invokes `impl From<&str> for OptionValue` which copies it to a `String`. `key.into()` also copies to a `String` for unrecognized or driver-specific keys. It's those copies which I'm mainly proposing to eliminate here. But also, a lot of these strings may be able to be interned (or made into constants) on the calling side and so a new allocation doesn't _have_ to be made every time. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
