Skip to content

Commit

Permalink
Don't re-scan the source tree in scripts/languages/update_all.py
Browse files Browse the repository at this point in the history
Only compute the result once.

This brings down the time spent from 3.5 seconds to 700 milliseconds on
my device.
  • Loading branch information
heinrich5991 committed Dec 30, 2024
1 parent 1b5dbe0 commit da66e83
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/languages/twlang.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import functools
import os
import re
from collections import OrderedDict
Expand Down Expand Up @@ -58,6 +59,7 @@ def check_file(path):
return matches


@functools.lru_cache(None)
def check_folder(path):
englishlist = OrderedDict()
for path2, dirs, files in os.walk(path):
Expand Down

0 comments on commit da66e83

Please sign in to comment.