perf(entropy): Fix nested imports in hot paths
Hoisted imports from inside frequently-called functions to module level: app_controller.py: - Added traceback and inspect at module level - Removed 3 nested traceback imports from exception handlers gui_2.py: - Added traceback at module level - Removed nested traceback import from _gui_func exception handler - Kept uvicorn lazy-loaded (only for --headless mode) multi_agent_conductor.py: - Removed unused 'import sys' from run() - Removed redundant nested imports (already at module level) Also adds audit scripts and entropy findings documentation.
This commit is contained in:
+1
-1
@@ -35,6 +35,7 @@ from src import thinking_parser
|
||||
import re
|
||||
import difflib
|
||||
import subprocess
|
||||
import traceback
|
||||
if sys.platform == "win32":
|
||||
import win32gui
|
||||
import win32con
|
||||
@@ -1319,7 +1320,6 @@ class App:
|
||||
imgui.end_popup()
|
||||
except Exception as e:
|
||||
print(f"ERROR in _gui_func: {e}")
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
|
||||
if pushed_prior_tint:
|
||||
|
||||
Reference in New Issue
Block a user