LL perf (UI): Chat history #369

Closed
opened 2026-10-04 14:09:31 +00:00 by sky_line · 2 comments
Owner

From the LL-origin inefficiency audit (finding U13). File/line references are from commit 0229f8872c; re-locate them before working.

Chat history

  • XML per message: a header built from XML for every message, including inspector_info_ctrl.xml per header (llchathistory.cpp:144-149, 626, 1261-1269).
  • Unbounded: max_length="2147483647" (widgets/chat_history.xml:13), so it never trims.
  • O(N) reflow per append: updateRects plus updateLayout over all segments (lltextbase.cpp:1974-1982, 4247-4251), i.e. O(N²) per session.
  • Unbounded IM storage: LLIMSession::mMsgs (llimview.cpp:1079).
  • Fix: header prototype pool; cap history; incremental rects.
  • Confirmed. M-L.

Verify the cost (profile or timer) before and after changing it.

From the LL-origin inefficiency audit (finding U13). File/line references are from commit 0229f8872c; re-locate them before working. **Chat history** - **XML per message:** a header built from XML for every message, including `inspector_info_ctrl.xml` per header (`llchathistory.cpp:144-149, 626, 1261-1269`). - **Unbounded:** `max_length="2147483647"` (`widgets/chat_history.xml:13`), so it never trims. - **O(N) reflow per append:** `updateRects` plus `updateLayout` over all segments (`lltextbase.cpp:1974-1982, 4247-4251`), i.e. O(N²) per session. - **Unbounded IM storage:** `LLIMSession::mMsgs` (`llimview.cpp:1079`). - **Fix:** header prototype pool; cap history; incremental rects. - Confirmed. M-L. Verify the cost (profile or timer) before and after changing it.
sky_line added this to the Slipstream project 2026-10-06 15:04:13 +00:00
Author
Owner

Pushed to main at 07c8a3ac73. Windowed chat history: 250-message window with infinite scroll, log paging, find across the whole conversation, pooled headers. A crash after Find (a pooled header's avatar icon registered under a null ID) is fixed. To test: scroll back, Find, live messages while scrolled up, timestamps / compact toggles.

Pushed to main at 07c8a3ac73. Windowed chat history: 250-message window with infinite scroll, log paging, find across the whole conversation, pooled headers. A crash after Find (a pooled header's avatar icon registered under a null ID) is fixed. To test: scroll back, Find, live messages while scrolled up, timestamps / compact toggles.
Author
Owner

Shipped in a published release and tested; closing (testing-lane sweep 2026-10-11).

Shipped in a published release and tested; closing (testing-lane sweep 2026-10-11).
sky_line 2026-10-11 13:25:03 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sky_line/Slipstream#369
No description provided.