Hi
I have in issue with runners being very CPU intensive.
Therefore I profiled a salt-master and was surprised to find the pure Python YAML scanner at 65% of a RunnerClient.
From the profiler call-graph:
```
RunnerClient.low salt/client/mixins.py:246 // 88%
safe_load salt/utils/yamlloader.py:218 // 57%
…
r.check_event yaml/parser.py:94 // 56%
check_token yaml/scanner.py:113 // 56%
fetch_more_tokens yaml/scanner.py:153 // 55%
scan_to_next_token yaml/scanner.py:753 // 54%
```
The pure Python YAML Loader is said to be much slower than the YAML CLoader.
Therefore, file `salt/utils/yamlloader.py` contains this replacement:
```
import yaml
try:
yaml.Loader = yaml.CLoader
yaml.Dumper = yaml.CDumper
except Exception:
pass
```
But variable `yaml.Loader` is never used, instead there is `class SaltYamlSafeLoader(yaml.SafeLoader)`
I guess the yaml.SafeLoader calls the pure Python yaml.parser and yaml.scanner
Does the salt-master uses the slow, pure-Python SafeLoader?
Why not use CSafeLoader?
Thank you
You received this message because you are subscribed to a topic in the Google Groups "Salt-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/salt-users/LIxzVCrPc1E/unsubscribe.
To unsubscribe from this group and all its topics, send an email to salt-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/salt-users/CAKw0-%2BOeD6-%2B%3DPsDKasvc4%2BhKUU91wVn5cM%2B9j7QhVESgAwX5Q%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/salt-users/CACAsXuMcDa2jCixHG5j3_4ZBycfs8W%3DF8sjq46rP6FHMRdNyHA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/salt-users/CAJJqF90NFCcKjJHQ4Xi%2BMDCo0KsmZvZaihXAvrqABB673Wg%2BvA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/salt-users/CACAsXuM5bNEj12ee%3DavsZLpnTZc2Ox7fefbuMUGmN2z%3DZf%3DQOQ%40mail.gmail.com.