Commit b2d5919d by Brian Coca

Merge pull request #10250 from cove/cyaml

improve yaml parsing performance by ~25% by using PyYAML's CParser loader
parents 2da35a55 825654a2
......@@ -70,6 +70,11 @@ try:
except ImportError:
import json
try:
from yaml import CSafeLoader as Loader
except ImportError:
from yaml import SafeLoader as Loader
PASSLIB_AVAILABLE = False
try:
import passlib.hash
......@@ -594,7 +599,7 @@ def parse_yaml(data, path_hint=None):
raise errors.AnsibleError(str(ve))
else:
# else this is pretty sure to be a YAML document
loaded = yaml.safe_load(data)
loaded = yaml.load(data, Loader=Loader)
return loaded
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment