forked from ansible/ansible
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 ansible#23579
- Loading branch information
Showing
2 changed files
with
21 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters