Skip to content

perf(memory): unnecessary String allocation in write-gate relation check #4699

@bug-ops

Description

@bug-ops

Description

is_low_signal_relation() in crates/zeph-memory/src/semantic/graph.rs calls .to_lowercase() on relation strings, allocating ~30 short Strings per extraction pass. All entries in the predicate list are ASCII.

Location

crates/zeph-memory/src/semantic/graph.rsis_low_signal_relation function

Fix

Replace .to_lowercase() == "..." comparisons with eq_ignore_ascii_case("..."). Zero allocation, same semantics for ASCII inputs.

Environment

Metadata

Metadata

Assignees

Labels

P4Long-term / exploratoryenhancementNew feature or requestmemoryzeph-memory crate (SQLite)

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions