Put opt-viewer critical items in parallel
Requires features from Python 2.7
Performance
Below are performance results across various configurations. These were taken on an i5-5200U (dual core + HT). They were taken with a small subset of the YAML output of building Python 3.6.0b3 with LTO+PGO. 60 YAML files.
"multiprocessing" is the current submission contents. "baseline" is as of 544f14c6b2a07a94168df31833dba9dc35fd8289 (I think this is aka r287505).
"ImportError" vs "class<...CLoader>" below are just confirming the expected configuration (with/without CLoader).
The below was measured on AMD A8-5500B (4 cores) with 224 input YAML files, showing a ~1.75x speed increase over the baseline with libYAML. I suspect it would scale well on high-end servers.
**************************************** MULTIPROCESSING **************************************** PyYAML: Traceback (most recent call last): File "<string>", line 1, in <module> ImportError: cannot import name CLoader Python 2.7.10 489.42user 5.53system 2:38.03elapsed 313%CPU (0avgtext+0avgdata 400308maxresident)k 0inputs+31392outputs (0major+473540minor)pagefaults 0swaps PyYAML+libYAML: <class 'yaml.cyaml.CLoader'> Python 2.7.10 78.69user 5.45system 0:32.63elapsed 257%CPU (0avgtext+0avgdata 398560maxresident)k 0inputs+31392outputs (0major+542022minor)pagefaults 0swaps PyPy/PyYAML: Traceback (most recent call last): File "<builtin>/app_main.py", line 75, in run_toplevel File "<builtin>/app_main.py", line 601, in run_it File "<string>", line 1, in <module> ImportError: cannot import name 'CLoader' Python 2.7.9 (2.6.0+dfsg-3, Jul 04 2015, 05:43:17) [PyPy 2.6.0 with GCC 4.9.3] 154.27user 8.12system 0:53.83elapsed 301%CPU (0avgtext+0avgdata 627960maxresident)k 808inputs+30376outputs (0major+727994minor)pagefaults 0swaps **************************************** BASELINE **************************************** PyYAML: Traceback (most recent call last): File "<string>", line 1, in <module> ImportError: cannot import name CLoader Python 2.7.10 358.08user 4.05system 6:08.37elapsed 98%CPU (0avgtext+0avgdata 315004maxresident)k 0inputs+31392outputs (0major+85252minor)pagefaults 0swaps PyYAML+libYAML: <class 'yaml.cyaml.CLoader'> Python 2.7.10 50.32user 3.30system 0:56.59elapsed 94%CPU (0avgtext+0avgdata 307296maxresident)k 0inputs+31392outputs (0major+79335minor)pagefaults 0swaps PyPy/PyYAML: Traceback (most recent call last): File "<builtin>/app_main.py", line 75, in run_toplevel File "<builtin>/app_main.py", line 601, in run_it File "<string>", line 1, in <module> ImportError: cannot import name 'CLoader' Python 2.7.9 (2.6.0+dfsg-3, Jul 04 2015, 05:43:17) [PyPy 2.6.0 with GCC 4.9.3] 72.94user 5.18system 1:23.41elapsed 93%CPU (0avgtext+0avgdata 455312maxresident)k 0inputs+30392outputs (0major+110280minor)pagefaults 0swaps