This is a good idea.  For parsing playbooks we made this change a long time
ago.  Could you open a bug report on GitHub for this?  With the holiday
vacation coming up, I don't want this to be forgotten.

Thanks,
-Toshio

On Dec 20, 2017 9:08 PM, <[email protected]> wrote:

> Hi all,
>
> I'm using ansible to deploy my home lab. It's running CentOS 7.4 AArch on
> a pine64 board,
> so it has a slow ARM cpu. Executing ansible is slow (10 sec without any
> playbook),
> and I started to look where time got spent.
> More than half of this time is lost parsing the base config yaml
> (ansible/config/base.yml).
> I patched ansible/config/manager.py, and added
> yaml.SafeLoader = yaml.CSafeLoader
> before
> yaml.safe_load(config_def)
> is invoked.
> This brought startup time to one third of the initial time.
>
> I checked pyyaml if CSafeLoader can be forced as a default one way or
> another,
> and after a quick check, I didn't find a possibility to set a default
> loader (except with extra parameter)
> (https://github.com/yaml/pyyaml/blob/master/lib/yaml/__init__.py)
>
> Is it possible to have the CSafeLoader as the default behaviour when
> running ansible?
> Or have I overlooked something, and should this be resolved differently?
>
> Thank you very much for any feedback!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Development" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to