Baymine opened a new issue, #66362: URL: https://github.com/apache/doris/issues/66362
### Problem `JsonFunctions::extract_from_object` passes formatted context strings to `HANDLE_SIMDJSON_ERROR`. The macro currently binds the message before checking the simdjson error code, so successful JSON-path lookups repeatedly execute `fmt::format` and construct an error string that is never used. This adds avoidable CPU and allocation overhead to the successful JSON extraction hot path. ### Proposed improvement Construct the message only inside the unlikely error branch while retaining owned string storage so formatted temporaries remain safe. Error status classification and message text remain unchanged. A local same-session RELEASE A/B microbenchmark over 4,096 rows improved the valid-field median from 689,024 ns to 364,504 ns (about 1.89x throughput). The missing-field error path remained approximately unchanged. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
