Skip to content

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

Description

@markshannon

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

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