Skip to content

slow filter and sort in bestCommittedRunNumber() #39

Description

@alchemydc

bestCommittedRunNumber resolution currently re-filters and re-sorts srcRuns for every driver (srcRuns.filter(...).sort(...)). Since srcRuns is already ORDER BY id, the sort is redundant, and the repeated filtering is O(drivers*runs). Consider pre-grouping srcRuns by driver_id once (you already build runsByDriver later) and reusing that list to compute the committed index.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions