Arc-ify stored log text to remove per-line double clones (ticket 100)

DataValue::LogLiteral and IngestedLine now carry an Arc<str> instead
of an owned String, so the two clones the ingest path paid per line
(once to move text into the write closure, once to store it) become
cheap refcount bumps instead of full string copies. Also cuts the
per-string-content cost of left_right's full-EngineSnapshot deep clone
on each reconciliation sync.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TeyhRfMYjMditek6geDRoQ
This commit is contained in:
Hugh Kaznowski
2026-09-07 13:26:03 +01:00
co-authored by Claude Sonnet 5
parent 5fee6909f2
commit f43445b280
11 changed files with 198 additions and 34 deletions
+4 -4
View File
@@ -894,7 +894,7 @@ mod tests {
.send(EngineMessage::Ingest(IngestedLine {
sequence,
timestamp: Timestamp::from_millis(sequence as i64),
text: text.to_string(),
text: text.into(),
}))
.await
.unwrap();
@@ -1144,7 +1144,7 @@ mod tests {
.send(EngineMessage::Ingest(IngestedLine {
sequence: 0,
timestamp: Timestamp::from_millis(0),
text: "level=info request duration=42".to_string(),
text: "level=info request duration=42".into(),
}))
.await
.unwrap();
@@ -1327,7 +1327,7 @@ mod tests {
.send(EngineMessage::Ingest(IngestedLine {
sequence: 0,
timestamp: Timestamp::from_millis(0),
text: "request path=/a duration=42".to_string(),
text: "request path=/a duration=42".into(),
}))
.await
.unwrap();
@@ -1511,7 +1511,7 @@ mod tests {
.send(EngineMessage::Ingest(IngestedLine {
sequence: 0,
timestamp: Timestamp::from_millis(0),
text: "dx=1 moved".to_string(),
text: "dx=1 moved".into(),
}))
.await
.unwrap();