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

mpi: additional performance improvement

parent b2e5e41a
No related branches found
No related tags found
No related merge requests found
...@@ -24,12 +24,13 @@ class ScannedDaysManager(object): ...@@ -24,12 +24,13 @@ class ScannedDaysManager(object):
del container[chunk] del container[chunk]
def __filter(self, mydict, chunk_filter, template_filter): def __filter(self, mydict, chunk_filter, template_filter):
if template_filter is None: chunks = set(mydict.keys())
chunks = set(mydict.keys()) if chunk_filter is not None:
else: chunks &= set(chunk_filter)
if template_filter is not None:
template_filter = set(template_filter) template_filter = set(template_filter)
chunks = { c for c, t_set in mydict.items() if t_set & template_filter } chunks = { c for c in chunks if mydict[c] & template_filter }
return chunks if chunk_filter is None else set(chunk_filter) & chunks return chunks
def add_chunk_to_process(self, chunk): def add_chunk_to_process(self, chunk):
if chunk not in self.chunks: 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