Skip to content

crypto/x509: reduce memory usage when parsing system root certs? #26731

@bradfitz

Description

@bradfitz

I noticed that loading the x509 system roots and parsing their certificates on Linux takes 526kB of memory.

(by making an HTTPS request for the side-effect of loading them: https://play.golang.org/p/re1rB_Ui1nS then hitting pprof)

I suspect have common subfields that might be able to share memory? Or does our super transparent representation preclude that?

GitHub won't let me upload an SVG, so:
screen shot 2018-07-31 at 7 30 03 pm

/cc @FiloSottile

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Performance

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions