{"action":"created","issue":{"url":"https://api.github.com/repos/LLNL/spack/issues/2010","repository_url":"https://api.github.com/repos/LLNL/spack","labels_url":"https://api.github.com/repos/LLNL/spack/issues/2010/labels{/name}","comments_url":"https://api.github.com/repos/LLNL/spack/issues/2010/comments","events_url":"https://api.github.com/repos/LLNL/spack/issues/2010/events","html_url":"https://github.com/LLNL/spack/pull/2010","id":182656902,"number":2010,"title":"Use cYAML if it is available","user":{"login":"tgamblin","id":299842,"avatar_url":"https://avatars.githubusercontent.com/u/299842?v=3","gravatar_id":"","url":"https://api.github.com/users/tgamblin","html_url":"https://github.com/tgamblin","followers_url":"https://api.github.com/users/tgamblin/followers","following_url":"https://api.github.com/users/tgamblin/following{/other_user}","gists_url":"https://api.github.com/users/tgamblin/gists{/gist_id}","starred_url":"https://api.github.com/users/tgamblin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tgamblin/subscriptions","organizations_url":"https://api.github.com/users/tgamblin/orgs","repos_url":"https://api.github.com/users/tgamblin/repos","events_url":"https://api.github.com/users/tgamblin/events{/privacy}","received_events_url":"https://api.github.com/users/tgamblin/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/LLNL/spack/labels/configuration","name":"configuration","color":"bfd4f2"},{"url":"https://api.github.com/repos/LLNL/spack/labels/pkg-database","name":"pkg-database","color":"006b75"},{"url":"https://api.github.com/repos/LLNL/spack/labels/speed","name":"speed","color":"c2e0c6"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2016-10-12T23:12:08Z","updated_at":"2016-10-15T08:21:14Z","closed_at":"2016-10-13T01:25:18Z","pull_request":{"url":"https://api.github.com/repos/LLNL/spack/pulls/2010","html_url":"https://github.com/LLNL/spack/pull/2010","diff_url":"https://github.com/LLNL/spack/pull/2010.diff","patch_url":"https://github.com/LLNL/spack/pull/2010.patch"},"body":"I threw this together working on #1562, and thought I'd just get it merged.\r\n\r\nSpack ships with its own `PyYAML` module in `lib/spack/external/yaml`, but it doesn't use the C `libyaml` because we don't want to require compiling anything -- Spack _must_ run out of the box.  \r\n\r\ncYAML is pretty fast, though, and with things like #1015 and #1535 the main bottleneck to operations like `spack find` is YAML parsing.  \r\n\r\nThis patch makes Spack use an already-installed PyYAML and the `CParser` and `CLoader` from `libyaml` if they're available.  It makes a `spack find` on @adamjstewart's 400+ installed packages from #1562 run **3x faster** (1s vs 3s) on my laptop.\r\n\r\n@alalazo @davydden @adamjstewart @citibeth "},"comment":{"url":"https://api.github.com/repos/LLNL/spack/issues/comments/253970432","html_url":"https://github.com/LLNL/spack/pull/2010#issuecomment-253970432","issue_url":"https://api.github.com/repos/LLNL/spack/issues/2010","id":253970432,"user":{"login":"pramodk","id":666852,"avatar_url":"https://avatars.githubusercontent.com/u/666852?v=3","gravatar_id":"","url":"https://api.github.com/users/pramodk","html_url":"https://github.com/pramodk","followers_url":"https://api.github.com/users/pramodk/followers","following_url":"https://api.github.com/users/pramodk/following{/other_user}","gists_url":"https://api.github.com/users/pramodk/gists{/gist_id}","starred_url":"https://api.github.com/users/pramodk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pramodk/subscriptions","organizations_url":"https://api.github.com/users/pramodk/orgs","repos_url":"https://api.github.com/users/pramodk/repos","events_url":"https://api.github.com/users/pramodk/events{/privacy}","received_events_url":"https://api.github.com/users/pramodk/received_events","type":"User","site_admin":false},"created_at":"2016-10-15T08:21:14Z","updated_at":"2016-10-15T08:21:14Z","body":"@tgamblin : After this merge, on bluegene-q system I see following:\r\n\r\n```bash\r\n$ ./bin/spack --version\r\nTraceback (most recent call last):\r\n  File \"./bin/spack\", line 98, in <module>\r\n    import spack\r\n  File \"/home/kumbhar/tmp_tk/spack/lib/spack/spack/__init__.py\", line 74, in <module>\r\n    repo = spack.repository.RepoPath()\r\n  File \"/home/kumbhar/tmp_tk/spack/lib/spack/spack/repository.py\", line 131, in __init__\r\n    repo_dirs = spack.config.get_config('repos')\r\n  File \"/home/kumbhar/tmp_tk/spack/lib/spack/spack/config.py\", line 403, in get_config\r\n    data = scope.get_section(section)\r\n  File \"/home/kumbhar/tmp_tk/spack/lib/spack/spack/config.py\", line 248, in get_section\r\n    data   = _read_config_file(path, schema)\r\n  File \"/home/kumbhar/tmp_tk/spack/lib/spack/spack/config.py\", line 323, in _read_config_file\r\n    data = syaml.load(f)\r\n  File \"/home/kumbhar/tmp_tk/spack/lib/spack/spack/util/spack_yaml.py\", line 213, in load\r\n    return yaml.load(*args, **kwargs)\r\n  File \"/usr/lib64/python2.6/site-packages/yaml/__init__.py\", line 71, in load\r\n    return loader.get_single_data()\r\n  File \"/usr/lib64/python2.6/site-packages/yaml/constructor.py\", line 37, in get_single_data\r\n    node = self.get_single_node()\r\n  File \"_yaml.pyx\", line 702, in _yaml.CParser.get_single_node (ext/_yaml.c:7647)\r\n  File \"_yaml.pyx\", line 905, in _yaml.CParser._parse_next_event (ext/_yaml.c:10396)\r\nyaml.reader.ReaderError: unacceptable character #x0000: control characters are not allowed\r\n  in \"/home/kumbhar/tmp_tk/spack/etc/spack/defaults/repos.yaml\", position 546\r\n```\r\n\r\nIf I go to the commit previous to this merge, it works fine:\r\n```bash\r\n$ git checkout b27f4e3aebf6c1ecbefffc22a9a27a4fe9ce0ab3\r\n$ ./bin/spack --version\r\n0.9.1\r\n```\r\n(note that this happens on one of the three bg-q system where I am trying)\r\n"}}
{"actor":{"display_login":"pramodk"}}