Skip to content

Do not sort with a function that makes HTTP requests. #14

@madsatech

Description

@madsatech

getSortedFutureANEventIDs and particularly sortIDByDate should not exist because event IDs are just URLs which can't be sorted by data that's isn't present. So sortIDByDate makes two HTTP requests every time it compares two event IDs, which can be O(n log n) times. It'll look up the full event data for the same request multiple times while sorting the array, discarding that data every time. This is slow, and particularly abusive of ActionNetwork's resources (idc about google).

Instead: get the event IDs, then look up the full event data, then sort the event data.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions