diff options
author | cedricchevalier19 <cedric.chevalier@cea.fr> | 2018-08-07 18:13:07 +0200 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2018-08-07 09:13:07 -0700 |
commit | 3301e21f06b918321e7471f8aaed997ee453f5b1 (patch) | |
tree | 6b959f2a4ebc0a911d0a9f9ffba9ae24a5d939c0 /lib | |
parent | 79e7359f4de2d16b3d35ca89288d3d5f6256e000 (diff) | |
download | spack-3301e21f06b918321e7471f8aaed997ee453f5b1.tar.gz spack-3301e21f06b918321e7471f8aaed997ee453f5b1.tar.bz2 spack-3301e21f06b918321e7471f8aaed997ee453f5b1.tar.xz spack-3301e21f06b918321e7471f8aaed997ee453f5b1.zip |
Fix performance issue when compiling. (#8828)
* Fix performance issue when compiling.
Spack was doing active wait when compiling, spoiling one core.
My fix consists in not setting any timeout for select, instead of
the previous 0 second.
* Fix comments about select.select timeout
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/llnl/util/tty/log.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/spack/llnl/util/tty/log.py b/lib/spack/llnl/util/tty/log.py index 70dc7c4ee5..64238f3ba0 100644 --- a/lib/spack/llnl/util/tty/log.py +++ b/lib/spack/llnl/util/tty/log.py @@ -446,10 +446,9 @@ class log_output(object): try: with keyboard_input(stdin): while True: - # Without the last parameter (timeout) select will - # wait until at least one of the two streams are - # ready. This may cause the function to hang. - rlist, _, xlist = select.select(istreams, [], [], 0) + # No need to set any timeout for select.select + # Wait until a key press or an event on in_pipe. + rlist, _, _ = select.select(istreams, [], []) # Allow user to toggle echo with 'v' key. # Currently ignores other chars. |