[Bug] UI slowness when loading long conversation history (chat/task view switch)
[Bug] UI slowness when loading long conversation history (chat/task view switch)
Body:
Environment:
Agent Zero version: M v0.9.5-1 (2025-09-23) Deployment: Docker container Hardware: 32+ GiB RAM, low CPU load, plenty of free memory Browser: Chrome/Edge (latest) Summary: When a chat or task has a long conversation history, the UI becomes noticeably slow or unresponsive, especially when switching between chat and task views. Manual task execution is fast, and server resources are not a bottleneck (CPU/memory usage is low). The issue appears to be related to the way the UI loads and renders long message histories.
Steps to reproduce:
Use Agent Zero with a chat/task that has a very long conversation history (hundreds of messages). Switch between chat and task views several times. Observe UI lag, slow loading, or temporary freezing. Expected behavior:
Switching between chat/task views should be fast and responsive, regardless of conversation length. Actual behavior:
UI becomes slow or freezes for several seconds when loading long histories. No significant server-side resource usage spike. Additional info:
Issue is not caused by server resource exhaustion (CPU/memory OK). No similar issue found in open/closed issues as of 2025-09-23. Possible solutions:
Implement lazy loading or pagination for chat/task history. Limit the number of messages loaded/rendered at once. Archive or collapse older messages by default. Optimize frontend rendering for long lists.