Request
Currently ParsedMessage::variable_t takes ownership over parsed variables primarily by making copies. In some situations we should be able to avoid these copies either by taking ownership via move construction, or via views.
Possible implementation
- In the KV-IR ingestion path we should be able to move-construct
EncodedTextAst instances to avoid copies. The KV-IR deserializer implementation just needs to expose a mutable view to EncodedTextAst.
- In the JSON ingestion path we should verify whether we actually need to make copies of unescaped strings from simdjson. The issue is that simdjson returns these unescaped strings as
std::string_view, and isn't clear about the exact lifetime of the returned std::string_view.
Request
Currently
ParsedMessage::variable_ttakes ownership over parsed variables primarily by making copies. In some situations we should be able to avoid these copies either by taking ownership via move construction, or via views.Possible implementation
EncodedTextAstinstances to avoid copies. The KV-IR deserializer implementation just needs to expose a mutable view toEncodedTextAst.std::string_view, and isn't clear about the exact lifetime of the returnedstd::string_view.