Skip to content

rebuildIndex loads ALL observations for ALL sessions into memory #42

@rohitg00

Description

@rohitg00

Problem

On startup or when the index is empty, rebuildIndex loads every observation from every session into memory. For large memory stores, this could cause OOM.

Location

src/functions/search.ts:15-33

Suggested Fix

Stream or paginate the rebuild process to avoid loading everything at once.

Metadata

Metadata

Assignees

No one assigned

    Labels

    mediumMedium priorityperformancePerformance optimization

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions