Skip to content

Eliminate double AnyProvider::clone() in embed_fn() #636

@bug-ops

Description

@bug-ops

Parent: #620

Problem

crates/zeph-llm/src/any.rs:52-57embed_fn() clones the full AnyProvider once for capture, then again per call inside the closure. The inner clone is unnecessary.

Solution

Wrap provider in Arc<AnyProvider> at the call site. Clones become pointer-sized.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1Important priorityllmLLM provider relatedperformancePerformance optimizationsize/S

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions