fixes and optimizations

This commit is contained in:
Colombo
2020-01-07 13:45:54 +04:00
parent 842a48964f
commit d3e6b435aa
6 changed files with 72 additions and 58 deletions

View File

@@ -22,7 +22,7 @@ class ThisThreadGenerator(object):
return next(self.generator_func)
class SubprocessGenerator(object):
def __init__(self, generator_func, user_param=None, prefetch=3, start_now=False):
def __init__(self, generator_func, user_param=None, prefetch=2, start_now=False):
super().__init__()
self.prefetch = prefetch
self.generator_func = generator_func

View File

@@ -125,7 +125,7 @@ class IndexHost():
result.append(shuffle_idxs.pop())
self.cqs[cq_id].put (result)
time.sleep(0.005)
time.sleep(0.001)
def create_cli(self):
cq = multiprocessing.Queue()