Skip to content

Remove deep-freezing of code objects and modules. #108716

Closed
@markshannon

Description

Deep-freezing, as implemented has a number of problems:

  • It is slow to build
  • It does not fit into the normal build system, make will not recreate deep-frozen modules
  • Deep-freezing only makes sense if the objects are immutable, but code objects are not (at the VM level)
  • It is a bit slower
  • It gets in the way of other optimizations, notable faster loading from pyc files.

So let's remove it.

But let's keep the ability to deep-freeze objects.
The ability to deep-freeze objects into the executable is valuable, we already do it with strings, and deep-freezing whole immutable object graphs like the sys and builtin modules could improve start up considerably.

Linked PRs

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions