Skip to content

Switch default pip install compile option to False #12920

Open
@notatallshaw

Description

@notatallshaw

What's the problem this feature will solve?

Upon investigating install performance sometimes compiling of Python files takes up a significant amount of the time.

Describe the solution you'd like

Switch the default pip install option from True to False, users who still need it can use --compile CLI, config, or env variables. But users who don't need it will save time, CPU, and disk space.

Alternative Solutions

My initial idea was to use compile_dir multiprocess capability, but on running benchmarks I found the time save to be very platform specific. On Linux you only need to be compiling ~15 average Python files to see a statistically significant improvement in time, but on Windows you need ~200 average Python files to see a statistically significant improvement in time.

Even then, while it would save time it would not save CPU or disk space.

Additional context

This is already the default behaviour of both uv and poetry (see --compile).

But there may be some history to why pip makes this the default behaviour that I am not aware of.

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions