Skip to content
Snippets Groups Projects
Commit 303f052d authored by Luca Scarabello's avatar Luca Scarabello
Browse files

mpi: additional performance improvement

parent b2e5e41a
Branches v1.2
Tags v1.2.1
No related merge requests found
......@@ -24,12 +24,13 @@ class ScannedDaysManager(object):
del container[chunk]
def __filter(self, mydict, chunk_filter, template_filter):
if template_filter is None:
chunks = set(mydict.keys())
else:
chunks = set(mydict.keys())
if chunk_filter is not None:
chunks &= set(chunk_filter)
if template_filter is not None:
template_filter = set(template_filter)
chunks = { c for c, t_set in mydict.items() if t_set & template_filter }
return chunks if chunk_filter is None else set(chunk_filter) & chunks
chunks = { c for c in chunks if mydict[c] & template_filter }
return chunks
def add_chunk_to_process(self, chunk):
if chunk not in self.chunks:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment