perf(core): avoid packed identity allocations - #52
Conversation
Signed-off-by: Seongho Bae <me@seonghobae.me>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
03354a4
into
docs/product-technical-gap-baseline
| let end = *cursor + length; | ||
| let value = &bytes[*cursor..end]; | ||
| *cursor = end; | ||
| String::from_utf8(value.to_vec()).map_err(|_| SemanticIndexError::NonUtf8PackedAuthorization) | ||
| std::str::from_utf8(value).map_err(|_| SemanticIndexError::NonUtf8PackedAuthorization) |
There was a problem hiding this comment.
📝 Info: Borrowed identity lifetime is bounded
read_packed_text borrows from the immutable request buffer. Ranking finishes before that buffer is released, including lookups, duplicate checks, and digesting.
(Refers to this code)
Was this helpful? React with 👍 or 👎 to provide feedback.
| candidate_lookup | ||
| .entry(item_id.clone()) | ||
| .or_default() | ||
| .insert(unit_id.clone(), index); |
There was a problem hiding this comment.
| return Err(SemanticIndexError::MalformedPackedAuthorization); | ||
| } | ||
| self.rank_authorized(model_identity, query_vector, &authorized) | ||
| self.rank_authorized_refs(model_identity, query_vector, &authorized) |
There was a problem hiding this comment.
Summary
This is stacked on the exact-index prerequisite merged into #41 by #51. It remains insufficient by itself for the LineageWeave 20 ms concurrent full-path contract.
Validation
Signed-off-by: Seongho Bae seongho.bae@gmail.com