Skip to content

Commit

Permalink
perf(high_level): Set thread to 3 times qps when creating the cache.
Browse files Browse the repository at this point in the history
  • Loading branch information
awwaawwa committed Dec 23, 2024
1 parent 394a06e commit a991830
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pdf2zh/high_level.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ def translate(
if file.startswith(tempfile.gettempdir()):
os.unlink(file)
generate_cache_start = time.time()
with concurrent.futures.ThreadPoolExecutor(max_workers=thread) as executor:
with concurrent.futures.ThreadPoolExecutor(max_workers=thread * 3) as executor:
translate_stream(
s_raw,
envs=kwarg.get("envs", {}),
Expand Down

0 comments on commit a991830

Please sign in to comment.