Skip to content

Commit f389bd0

Browse files
committed
perf: massive optimization of core logic tests and LanguageTool integration
- Implemented ProcessPoolExecutor to leverage multi-core CPUs , bypassing Python's GIL. - Optimized LanguageTool client with PID-based lazy session loading to ensure thread/process safety. - Implemented isolated task directories for parallel test execution. - Reduced self-test duration from ~60s to 11s on Linux environments.
1 parent 13fff08 commit f389bd0

File tree

10 files changed

+681
-223
lines changed

10 files changed

+681
-223
lines changed

aura_engine.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@
120120
# ==============================================================================
121121
# --- PRE-RUN SETUP VALIDATION ---
122122

123+
# aura_engine.py:123
123124
if str(PROJECT_ROOT) not in sys.path:
124125
sys.path.insert(0, str(PROJECT_ROOT))
125126

@@ -205,6 +206,7 @@
205206
PIDFILE = TMP_DIR / "aura_engine.pid"
206207
LOG_FILE = Path("log/aura_engine.log")
207208

209+
# aura_engine.py:208
208210
SCRIPT_DIR = Path(__file__).resolve().parent
209211
LANGUAGETOOL_JAR_PATH = f"{SCRIPT_DIR}/LanguageTool-6.6/languagetool-server.jar"
210212

config/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
r"0 a\.d\.": ("SL5net >> Aura", 1), # 14400 = 4 h autocivp/moddata/autocivP_IconNames_README.txt
6666
r"Matrix|Discord": ("🗣SL5net ⟫ Aura", 3600), # 1 Stunde für Chat
6767
r"Outlook|Mail": ("-- Sent via Aura --", 86400), # 1 Tag für E-Mails
68-
r"Konsole|kate|Google AI Studio|google ai studio": ("", 86400),
68+
r"\.py|Konsole|kate|Google AI Studio|google ai studio|google ai studio": ("", 999999),
6969
r".*": ("🗣[ SL5net Aura ]", 1800) # 30 Min Fallback
7070
}
7171

scripts/py/func/checks/integrity_rules.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,9 @@
103103
"Finalizing recording session:",
104104
],
105105

106-
"scripts/py/func/checks/self_tester.py": [
107-
"if actual.lstrip() == expected:"
108-
],
106+
# "scripts/py/func/checks/self_tester.py": [
107+
# "if actual.lstrip() == expected:"
108+
# ],
109109

110110
"scripts/py/func/model_manager.py": [
111111
"Reactive Loading" ,

scripts/py/func/checks/run_function_with_throttling.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
# INITIAL_WAIT_TIME = 1.0
1515
# MAX_WAIT_TIME = 1.0
1616

17-
# run_always_ignore_times = True
18-
run_always_ignore_times = False
17+
run_always_ignore_times = True
18+
# run_always_ignore_times = False
1919

2020
# # tags: time inite minute seconds
2121

0 commit comments

Comments
 (0)