mirror of https://github.com/python/cpython
gh-117205: Increase chunksize when compiling pyc in parallel (#117206)
This commit is contained in:
parent
985917dc8d
commit
b4fe02f595
|
@ -116,7 +116,8 @@ def compile_dir(dir, maxlevels=None, ddir=None, force=False,
|
||||||
prependdir=prependdir,
|
prependdir=prependdir,
|
||||||
limit_sl_dest=limit_sl_dest,
|
limit_sl_dest=limit_sl_dest,
|
||||||
hardlink_dupes=hardlink_dupes),
|
hardlink_dupes=hardlink_dupes),
|
||||||
files)
|
files,
|
||||||
|
chunksize=4)
|
||||||
success = min(results, default=True)
|
success = min(results, default=True)
|
||||||
else:
|
else:
|
||||||
for file in files:
|
for file in files:
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Speed up :func:`compileall.compile_dir` by 20% when using multiprocessing by increasing ``chunksize``.
|
Loading…
Reference in New Issue