Skip to content

Commit

Permalink
[sosreport] do not pass chunksize to ThreadPoolExecutor.map()
Browse files Browse the repository at this point in the history
3.4 python also appears to be broken by an unnecessary use of the
chunksize argument when threading plugins landed.  According to
the docs it defaults to 1, and has no effect for the
ThreadPoolExecutor class:

  "For very long iterables, using a large value for chunksize can
   significantly improve performance compared to the default size
   of 1. With ThreadPoolExecutor, chunksize has no effect."

Related: #1603

Signed-off-by: Bryan Quigley <[email protected]>
Signed-off-by: Bryn M. Reeves <[email protected]>
  • Loading branch information
Bryan Quigley authored and bmr-cymru committed Mar 26, 2019
1 parent 15e4dbd commit 6581488
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sos/sosreport.py
Original file line number Diff line number Diff line change
Expand Up @@ -973,7 +973,7 @@ def collect(self):
self.plugpool = ThreadPoolExecutor(self.opts.threads)
# Pass the plugpool its own private copy of self.pluglist
results = self.plugpool.map(self._collect_plugin,
list(self.pluglist), chunksize=1)
list(self.pluglist))
self.plugpool.shutdown(wait=True)
for res in results:
if not res:
Expand Down

0 comments on commit 6581488

Please sign in to comment.