From 807c3d834c15858030253a9f70ac1f0a57c6ac4c Mon Sep 17 00:00:00 2001 From: Jeremy Saklad Date: Sat, 18 Sep 2021 19:09:13 -0500 Subject: [PATCH] Add __slots__ to internal printer class This slightly reduces memory usage. --- bonemarketsolver/solve.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bonemarketsolver/solve.py b/bonemarketsolver/solve.py index 98580ee..42ac784 100644 --- a/bonemarketsolver/solve.py +++ b/bonemarketsolver/solve.py @@ -1392,6 +1392,8 @@ def Solve(shadowy_level, bone_market_fluctuations = None, zoological_mania = Non class SkeletonPrinter(cp_model.CpSolverSolutionCallback): """A class that prints the steps that comprise a skeleton as well as relevant attributes.""" + __slots__ = 'this', '__solution_count' + def __init__(self): cp_model.CpSolverSolutionCallback.__init__(self) self.__solution_count = 0