Commit 66d895a8 authored by Iustin Pop's avatar Iustin Pop
Browse files

Add __slots__ on objects in jqueue

Adding slots to _QueuedOpCode decreases memory usage (of these objects)
by roughly four times. It is a lesser change for _QueuedJobs.
Signed-off-by: default avatarIustin Pop <>
Reviewed-by: default avatarMichael Hanselmann <>
parent 7f5e61b4
......@@ -80,6 +80,10 @@ class _QueuedOpCode(object):
@ivar stop_timestamp: timestamp for the end of the execution
__slots__ = ["input", "status", "result", "log",
"start_timestamp", "end_timestamp",
def __init__(self, op):
"""Constructor for the _QuededOpCode.
......@@ -152,6 +156,11 @@ class _QueuedJob(object):
@ivar change: a Condition variable we use for waiting for job changes
__slots__ = ["queue", "id", "ops", "run_op_index", "log_serial",
"received_timestamp", "start_timestamp", "end_timestamp",
def __init__(self, queue, job_id, ops):
"""Constructor for the _QueuedJob.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment