mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-07-25 15:05:20 +00:00
Performance optimizations: LazyVStack, UI batching, timer consolidation (#375)
- Replace VStack with LazyVStack for message list to enable on-demand rendering - Batch UI updates in ChatViewModel to reduce main thread operations - Consolidate 12 timers into 3 (high/medium/low frequency) in BluetoothMeshService - Fix thread safety in scheduleUIUpdate with main thread check These changes significantly improve app responsiveness and reduce CPU usage. Co-authored-by: jack <jackjackbits@users.noreply.github.com>
This commit is contained in:
@@ -239,7 +239,7 @@ struct ContentView: View {
|
||||
private func messagesView(privatePeer: String?) -> some View {
|
||||
ScrollViewReader { proxy in
|
||||
ScrollView {
|
||||
VStack(alignment: .leading, spacing: 0) {
|
||||
LazyVStack(alignment: .leading, spacing: 0) {
|
||||
// Extract messages based on context (private or public chat)
|
||||
let messages: [BitchatMessage] = {
|
||||
if let privatePeer = privatePeer {
|
||||
|
||||
Reference in New Issue
Block a user