Skip to content

PERF-13 · Memoize AWS client construction #76

Description

@kiwifellows

Part of #63.

Problem

GenericAwsScanner::executeApiCall() (app/app/Services/Scanners/GenericAwsScanner.php:82) constructs a new Sdk() and a new client for every single API call. A region job doing 200 calls builds 200 clients.

The SDK memoizes API models statically so this is not catastrophic, but it is pure waste.

Change

Memoize the client per (service, region) for the lifetime of the scanner instance.

Natural to do alongside PERF-5, which touches the same construction path.

Priority: P2

Metadata

Metadata

Assignees

No one assigned

    Labels

    performanceScan speed, throughput, resource useroadmap:laterReal, but waiting on a triggersize/XSUnder a day

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions