mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
bpo-45850: Implement deep-freeze on Windows (#29648)
Implement changes to build with deep-frozen modules on Windows. Note that we now require Python 3.10 as the "bootstrap" or "host" Python. This causes a modest startup speed (around 7%) on Windows.
This commit is contained in:
parent
4d6c0c0cce
commit
1037ca5a8e
9 changed files with 500 additions and 24 deletions
22
Tools/scripts/startuptime.py
Normal file
22
Tools/scripts/startuptime.py
Normal file
|
@ -0,0 +1,22 @@
|
|||
# Quick script to time startup for various binaries
|
||||
|
||||
import subprocess
|
||||
import sys
|
||||
import time
|
||||
|
||||
NREPS = 100
|
||||
|
||||
|
||||
def main():
|
||||
binaries = sys.argv[1:]
|
||||
for bin in binaries:
|
||||
t0 = time.time()
|
||||
for _ in range(NREPS):
|
||||
result = subprocess.run([bin, "-c", "pass"])
|
||||
result.check_returncode()
|
||||
t1 = time.time()
|
||||
print(f"{(t1-t0)/NREPS:6.3f} {bin}")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
Loading…
Add table
Add a link
Reference in a new issue