[issue34296] Speed up python startup by pre-warming the vm

Nick Coghlan report at bugs.python.org
Sat Aug 4 03:41:45 EDT 2018


Nick Coghlan <ncoghlan at gmail.com> added the comment:

It isn't currently feasible to do anything along these lines, as the CPython runtime is highly configurable, so it's far from clear what, if anything, could be shared from run to run, and nor is it clear how the interpreter could check whether or not the current configuration settings matched those of the pre-warmed one.

However, the work taking place for PEP 432 (issue dependency added) will potentially make it possible to revisit this, as there may be a way to cache preconfigured interpreters in a fashion that means calculating the cache key from the current configuration and then loading the cached interpreter state is faster that imperatively initialising a fresh interpreter.

Even if it isn't possible to cache an entire interpreter state, there may at least be opportunities to optimise particular configuration substeps.

----------
dependencies: +PEP 432: Redesign the interpreter startup sequence

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34296>
_______________________________________


More information about the Python-bugs-list mailing list