Skip to content

Make _unindexEvent O(1) instead of scanning all indices #43

@thedhanawada

Description

@thedhanawada

Problem

EventStore._unindexEvent() scans all date, month, category, and status indices to find and remove the event. This is O(n) where n is the total number of index entries.

Fix

Track which index keys each event belongs to (e.g., event._indexKeys = { dates: [...], months: [...], ... }). On removal, only touch those specific keys.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions