Skip to content

Performance: domains.map(&:destroy) instead of destroy_all in SetupController #45

@philipithomas

Description

@philipithomas

Description

In app/controllers/setup_controller.rb:63, 78:

@account.domains.map(&:destroy)

This loads each domain and destroys one-by-one (N+1 deletes).

Recommendation

Use @account.domains.destroy_all for a single operation.

Severity

Low

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