mirror of https://github.com/ansible/ansible.git
Avoid default serialization of classes in dump_attrs
For playbook base objects, when dumping attributes via dump_attrs() an
attribute like loop_control is a class. Using the default serialization
for these is slow and consumes a lot of memory. Since LoopControl is also
based on the Base class, we can use serialize() instead and save a lot of
resources.
This also adds a from_attrs() complimentary method to nicely turn the
dumped attrs back into proper field attributes.
Fixes #23579
(cherry picked from commit 78478e80ea)
pull/24764/head
parent
3a6fd9448e
commit
180ce9ffe6
Loading…
Reference in New Issue