Skip to content

py_ecc is very slow to import #135

@charles-cooper

Description

@charles-cooper

What happened?

py_ecc takes close to 1s to import. this increases startup time for anything which depends on py_ecc, including py-evm and titanoboa.

Code that produced the error

time python -c "import py_ecc"

Full error output

No response

Fill this section in if you know how this could or should be fixed

Not exactly sure, but one thing that jumped out is py_ecc could stop doing so much during module initialization. there are a lot of assertions throughout py_ecc modules which take a lot of CPU time and frankly should only be done during testing.

py-ecc Version

d5e5b20

Python Version

python 3.10-3.12

Operating System

No response

Output from pip freeze

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions