perf: avoid small own clones and intermediate Vec allocations

- Derive Copy on 6 small enums (MessageRole, TaskState, StorageKind, EmbeddingBackend, PdfIngestMode, KnowledgeEntityType)
- Change create_ingestion_payload files param from Vec<FileInfo> to &[FileInfo]
- Remove 5 intermediate Vec allocations (4 embedding serialization + 1 format_history) using write! loop
- Remove 7 unnecessary .clone() calls exposed by Copy derive
This commit is contained in:
Per Stark
2026-05-27 10:28:08 +02:00
parent f5f0454904
commit c60db0fb56
9 changed files with 64 additions and 60 deletions
+1 -1
View File
@@ -73,7 +73,7 @@ pub async fn ingest_data(
input.content,
input.context,
input.category,
file_infos,
&file_infos,
&user_id,
)?;