← Alle PRs
#1415

Chat: cache line wraps per log entry (no per-frame getWrap)

merge ? CI rot GitHub ↗

perf/chat-wrap-cache · PurpleFuchs · 3 Dateien · +35 −5 · 2026-11-07

Zusammenfassung

Card a141db (Kai chose Option 1: wrap cache). Both chat paths ran font:getWrap on every log entry every frame (open log + overlay twin at ChatWindow:321, per analyst) — up to 1000 wraps/frame. New shared GuiElements/Chat/ChatWrapCache.GetLines: single-slot {Text,Width,Font,Lines} cache on the entry itself (mutation/resize/font-safe, no flush path needed). Font in the key because both paths wrap the same FILE_Log with different font objects. luajit clean.

Geänderte Dateien (3)
Source/GuiElements/Chat/ChatWrapCache.luaneu+29 −0
Source/GuiElements/Chat/DrawChatWindow.luageändert+2 −2
Source/Objects/Gui/ChatWindow.luageändert+4 −3