conductor(checkpoint): Final performance optimizations for Phase 3: Throttled UI updates and optimized retro blinking

This commit is contained in:
2026-02-23 15:12:20 -05:00
parent b91e72b749
commit 7aa9fe6099
3 changed files with 46 additions and 39 deletions

76
gui.py
View File

@@ -520,6 +520,8 @@ class App:
self.perf_monitor.alert_callback = self._on_performance_alert
self._last_bleed_update_time = 0
self._last_diag_update_time = 0
self._last_script_alpha = -1
self._last_resp_alpha = -1
self._recalculate_session_usage()
# ---------------------------------------------------------------- project loading
@@ -2316,26 +2318,28 @@ class App:
val = math.sin(elapsed * 8 * math.pi)
alpha = 60 if val > 0 else 0
if not dpg.does_item_exist("script_blink_theme"):
with dpg.theme(tag="script_blink_theme"):
with dpg.theme_component(dpg.mvAll):
dpg.add_theme_color(dpg.mvThemeCol_FrameBg, (0, 100, 255, alpha), tag="script_blink_color")
dpg.add_theme_color(dpg.mvThemeCol_ChildBg, (0, 100, 255, alpha), tag="script_blink_color2")
else:
dpg.set_value("script_blink_color", [0, 100, 255, alpha])
if dpg.does_item_exist("script_blink_color2"):
dpg.set_value("script_blink_color2", [0, 100, 255, alpha])
if alpha != self._last_script_alpha:
self._last_script_alpha = alpha
if not dpg.does_item_exist("script_blink_theme"):
with dpg.theme(tag="script_blink_theme"):
with dpg.theme_component(dpg.mvAll):
dpg.add_theme_color(dpg.mvThemeCol_FrameBg, (0, 100, 255, alpha), tag="script_blink_color")
dpg.add_theme_color(dpg.mvThemeCol_ChildBg, (0, 100, 255, alpha), tag="script_blink_color2")
else:
dpg.set_value("script_blink_color", [0, 100, 255, alpha])
if dpg.does_item_exist("script_blink_color2"):
dpg.set_value("script_blink_color2", [0, 100, 255, alpha])
if dpg.does_item_exist("last_script_output"):
try:
dpg.bind_item_theme("last_script_output", "script_blink_theme")
dpg.bind_item_theme("last_script_text", "script_blink_theme")
if dpg.does_item_exist("last_script_output_wrap_container"):
dpg.bind_item_theme("last_script_output_wrap_container", "script_blink_theme")
if dpg.does_item_exist("last_script_text_wrap_container"):
dpg.bind_item_theme("last_script_text_wrap_container", "script_blink_theme")
except Exception:
pass
if dpg.does_item_exist("last_script_output"):
try:
dpg.bind_item_theme("last_script_output", "script_blink_theme")
dpg.bind_item_theme("last_script_text", "script_blink_theme")
if dpg.does_item_exist("last_script_output_wrap_container"):
dpg.bind_item_theme("last_script_output_wrap_container", "script_blink_theme")
if dpg.does_item_exist("last_script_text_wrap_container"):
dpg.bind_item_theme("last_script_text_wrap_container", "script_blink_theme")
except Exception:
pass
if self._trigger_blink:
self._trigger_blink = False
@@ -2360,23 +2364,25 @@ class App:
val = math.sin(elapsed * 8 * math.pi)
alpha = 50 if val > 0 else 0
if not dpg.does_item_exist("response_blink_theme"):
with dpg.theme(tag="response_blink_theme"):
with dpg.theme_component(dpg.mvAll):
dpg.add_theme_color(dpg.mvThemeCol_FrameBg, (0, 255, 0, alpha), tag="response_blink_color")
dpg.add_theme_color(dpg.mvThemeCol_ChildBg, (0, 255, 0, alpha), tag="response_blink_color2")
else:
dpg.set_value("response_blink_color", [0, 255, 0, alpha])
if dpg.does_item_exist("response_blink_color2"):
dpg.set_value("response_blink_color2", [0, 255, 0, alpha])
if alpha != self._last_resp_alpha:
self._last_resp_alpha = alpha
if not dpg.does_item_exist("response_blink_theme"):
with dpg.theme(tag="response_blink_theme"):
with dpg.theme_component(dpg.mvAll):
dpg.add_theme_color(dpg.mvThemeCol_FrameBg, (0, 255, 0, alpha), tag="response_blink_color")
dpg.add_theme_color(dpg.mvThemeCol_ChildBg, (0, 255, 0, alpha), tag="response_blink_color2")
else:
dpg.set_value("response_blink_color", [0, 255, 0, alpha])
if dpg.does_item_exist("response_blink_color2"):
dpg.set_value("response_blink_color2", [0, 255, 0, alpha])
if dpg.does_item_exist("ai_response"):
try:
dpg.bind_item_theme("ai_response", "response_blink_theme")
if dpg.does_item_exist("ai_response_wrap_container"):
dpg.bind_item_theme("ai_response_wrap_container", "response_blink_theme")
except Exception:
pass
if dpg.does_item_exist("ai_response"):
try:
dpg.bind_item_theme("ai_response", "response_blink_theme")
if dpg.does_item_exist("ai_response_wrap_container"):
dpg.bind_item_theme("ai_response_wrap_container", "response_blink_theme")
except Exception:
pass
self.perf_monitor.end_component("Blinking")
# Flush any comms entries queued from background threads

View File

@@ -165,7 +165,7 @@ history = [
[discussion.discussions."test for gemini conductor"]
git_commit = "ccdba69214aea169a4e707da7b425ae0c6139fca"
last_updated = "2026-02-23T15:06:42"
last_updated = "2026-02-23T15:08:48"
history = [
"@2026-02-23T11:08:38\nUser:\nadded a file to yoru exposed files read it.",
"@2026-02-23T11:08:43\nAI:\nI have read the `MainContext.md` file. It contains extensive documentation about the \"Manual Slop\" project.\n\nWas `MainContext.md` the file you were referring to? If not, please specify the file's name or path.",
@@ -176,6 +176,7 @@ history = [
"@2026-02-23T14:59:56\nSystem:\n[PERFORMANCE ALERT] Frame time high: 117.4ms; Input lag high: 156.2ms. Please consider optimizing recent changes or reducing load.",
"@2026-02-23T15:00:27\nSystem:\n[PERFORMANCE ALERT] Frame time high: 206.5ms; Input lag high: 156.2ms. Please consider optimizing recent changes or reducing load.",
"@2026-02-23T15:06:32\nSystem:\n[PERFORMANCE ALERT] Frame time high: 817.2ms. Please consider optimizing recent changes or reducing load.",
"@2026-02-23T15:08:32\nSystem:\n[PERFORMANCE ALERT] Frame time high: 679.9ms. Please consider optimizing recent changes or reducing load.",
]
[agent.tools]

View File

@@ -35,5 +35,5 @@ active = "main"
[discussion.discussions.main]
git_commit = ""
last_updated = "2026-02-23T15:07:42"
last_updated = "2026-02-23T15:12:14"
history = []