A TripleO environment typically contains hundreds of resource type
mappings. And a TripleO deployment typically contains hundreds of nested
stacks. The result is typically tens of thousands of ResourceInfo objects
all loaded in memory at the same time.
This change saves memory by using slots for these classes instead of
__dict__. I'd expect this to save on the order of tens of megabytes of RAM
in a TripleO deployment - comparatively modest, but an easy win given that
it is such a simple change.
Reviewed: https:/ /review. openstack. org/382068 /git.openstack. org/cgit/ openstack/ heat/commit/ ?id=adb8629a90e ff299974c7d8138 fe60194d5961ec
Committed: https:/
Submitter: Jenkins
Branch: master
commit adb8629a90eff29 9974c7d8138fe60 194d5961ec
Author: Zane Bitter <email address hidden>
Date: Tue Oct 4 16:46:58 2016 -0400
Use __slots__ in ResourceInfo classes
A TripleO environment typically contains hundreds of resource type
mappings. And a TripleO deployment typically contains hundreds of nested
stacks. The result is typically tens of thousands of ResourceInfo objects
all loaded in memory at the same time.
This change saves memory by using slots for these classes instead of
__dict__. I'd expect this to save on the order of tens of megabytes of RAM
in a TripleO deployment - comparatively modest, but an easy win given that
it is such a simple change.
Change-Id: Ia0f17be794618d 7b41c463e199275 5947c56d4d1
Partial-Bug: #1626675