gh-117205: Increase chunksize when compiling pyc in parallel (#117206)

This commit is contained in:
Shantanu 2024-04-03 15:24:24 -07:00 committed by GitHub
parent 985917dc8d
commit b4fe02f595
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View File

@ -116,7 +116,8 @@ def compile_dir(dir, maxlevels=None, ddir=None, force=False,
prependdir=prependdir,
limit_sl_dest=limit_sl_dest,
hardlink_dupes=hardlink_dupes),
files)
files,
chunksize=4)
success = min(results, default=True)
else:
for file in files:

View File

@ -0,0 +1 @@
Speed up :func:`compileall.compile_dir` by 20% when using multiprocessing by increasing ``chunksize``.