Univention Bugzilla – Bug 52294
Define __slots__ for state objects in UMC-Server components
Last modified: 2020-11-04 14:49:27 CET
As UMC might contain multiple thousands opened sessions we should increase the size of all objects stored in the session. This can be achieved by adding __slots__ to those classes, which then doesn't store a dictionary per object. See https://docs.python.org/2/reference/datamodel.html#slots.
__slots__ have been added in every relevant object we control. univention-management-console.yaml 9adffdd185ab | YAML Bug #52294 univention-management-console (11.0.5-7) 893ba879b498 | Bug #52294: add __slots__ to session objects
OK python-memory-profile: 86.9 MiB a = [State(None, None) for x in range(10000)] vs 96.9 MiBa = [State(None, None) for x in range(10000)]
Sorry. Clicked too early. YAML: OK Code: OK (No attributes other than the __slots__ are accessed AFAICS) Profile: Reduced (see comment above)
<https://errata.software-univention.de/#/?erratum=4.4x794>