perf(tui): wrap a chat log as it arrives instead of on every frame
A room's chat log was wrapped to the pane width from the first line on every frame, so a busy room lagged more the longer it stayed open: in the harness 30,000 lines cost 16.6ms a frame. The wrapped rows now live with the log and a draw only wraps the lines that arrived since the last one, starting over when the width changes. The same cache serves the private-message box, and the room list draws only its visible page like the other tables. The 30,000-line room now draws in 0.4ms.
This commit is contained in:
@@ -6,9 +6,9 @@ mod settings;
|
||||
|
||||
pub use app_state::{
|
||||
AppState, ChatMessage, CommandBarMode, DownloadEntry, FocusedPane, LogView,
|
||||
MessageDirection, PaneLayout, SearchEntry, SearchStatus,
|
||||
MessageDirection, PaneLayout, SearchEntry, SearchStatus, WrappedLog,
|
||||
};
|
||||
pub use browse::{BrowseState, BrowseStatus, BrowseTabs};
|
||||
pub use file_display_data::FileDisplayData;
|
||||
pub use rooms::{RoomLine, RoomsState, RoomsView};
|
||||
pub use rooms::{OpenRoom, RoomLine, RoomsState, RoomsView};
|
||||
pub use settings::{SettingsAction, SettingsMode, SettingsState};
|
||||
|
||||
Reference in New Issue
Block a user