mirror of
https://github.com/PR0M3TH3AN/TORCH.git
synced 2026-11-06 12:51:54 +00:00
perf: debounce dashboard render on websocket events
Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
1 parent
1bff009a63
commit
fb58408b84
7 files changed
+111
-2
No files matched your search
@@ -0,0 +1,21 @@
|
||||
---
|
||||
agent: perf-agent
|
||||
cadence: daily
|
||||
run-start: 2026-02-24T01:10:54Z
|
||||
---
|
||||
|
||||
# Context
|
||||
|
||||
Executed prompt: src/prompts/daily/perf-agent.md
|
||||
|
||||
## Goal
|
||||
Daily, measurable improvement of app responsiveness by finding and fixing background CPU/network work that degrades UX.
|
||||
|
||||
## Scope
|
||||
- `src/` directory for performance patterns.
|
||||
- `dashboard/` for UI responsiveness.
|
||||
|
||||
## Constraints
|
||||
- Never invent files or APIs.
|
||||
- Keep changes small and incremental.
|
||||
- Verify changes with tests.
|
||||
@@ -0,0 +1,12 @@
|
||||
---
|
||||
agent: perf-agent
|
||||
cadence: daily
|
||||
run-start: 2026-02-24T01:10:54Z
|
||||
---
|
||||
|
||||
# Decisions
|
||||
|
||||
Executed prompt: src/prompts/daily/perf-agent.md
|
||||
|
||||
## Decision: Debounce renderLocks in dashboard/app.js
|
||||
**Rationale:** The `renderLocks` function is called synchronously on every WebSocket message. During high traffic or initial load, this can freeze the UI. Using `requestAnimationFrame` and checking `document.hidden` ensures we only render when necessary and efficient.
|
||||
@@ -0,0 +1,13 @@
|
||||
---
|
||||
agent: perf-agent
|
||||
cadence: daily
|
||||
run-start: 2026-02-24T01:10:54Z
|
||||
---
|
||||
|
||||
# Test Log
|
||||
|
||||
Executed prompt: src/prompts/daily/perf-agent.md
|
||||
|
||||
## Search Patterns
|
||||
**Command:** `grep -rE 'setInterval|Promise.all' src/`
|
||||
**Result:** (Will be populated in next steps)
|
||||
@@ -0,0 +1,18 @@
|
||||
---
|
||||
agent: perf-agent
|
||||
cadence: daily
|
||||
run-start: 2026-02-24T01:10:54Z
|
||||
---
|
||||
|
||||
# Todo
|
||||
|
||||
Executed prompt: src/prompts/daily/perf-agent.md
|
||||
|
||||
## Pending
|
||||
- [ ] Run search patterns for performance issues.
|
||||
- [ ] Analyze `dashboard/app.js` for synchronous rendering issues.
|
||||
- [ ] Fix `renderLocks` in `dashboard/app.js` to use `requestAnimationFrame` and visibility check.
|
||||
- [ ] Generate performance report.
|
||||
|
||||
## Completed
|
||||
- [x] Create artifacts.
|
||||
Reference in new issue
Block a user