Update to how similar messages matching is handled when updating po files from pot one (gain something like 20% in heavy update situations, and save a nice bunch of memory!).

This commit is contained in:
2013-02-12 17:32:54 +00:00
parent dcea2800a7
commit f2d9fc7e25
4 changed files with 96 additions and 29 deletions

View File

@@ -97,10 +97,13 @@ def main():
if os.path.exists(po):
pool_data.append((po, lang, pot_msgs))
with concurrent.futures.ProcessPoolExecutor() as executor:
for r in executor.map(process_po, pool_data, timeout=600):
if r != 0:
ret = r
for r in map(process_po, pool_data):
if r != 0:
ret = r
#with concurrent.futures.ProcessPoolExecutor() as executor:
#for r in executor.map(process_po, pool_data, timeout=600):
#if r != 0:
#ret = r
return ret