Skip to content

in getFilteredCveId, getAllOrgs and getAllUsers can be too slow #1843

@ElectricNroff

Description

@ElectricNroff

// Create map of orgUUID to shortnames and users to simplify aggregation later
const orgs = await orgRepo.getAllOrgs()
const users = await userRepo.getAllUsers()

This function obtains the entire Org and User collections. Instead of calling the current getAllOrgs and getAllUsers, it should call similar functions that have a projection, e.g.,

UUID: 1, short_name: 1, _id: 0
UUID: 1, username: 1, _id: 0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Needs Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions