Files
Arcturus-Morningstar-Extended/Emulator
duckietm f2d8f109ff 🆙 Optimization for the gameserver
- Room Cleanup Optimization (RoomManager.java)

Added roomsByOwner ConcurrentHashMap that tracks which rooms belong to which owner
clearInactiveRooms() now iterates unique owners instead of ALL rooms
Went from O(rooms × clients) to O(unique_owners × clients) every 120s

 - Volatile Fields (Room.java)

Removed volatile from 27 room config fields (score, category, chatMode, allowPets, etc.)
Kept volatile only on 8 fields that genuinely need cross-thread visibility (loaded, preLoaded, needsUpdate, muted, etc.)
Reduces CPU cache line invalidation on every room cycle tick

- Search Cache TTL (SearchUserEvent.java + CleanerThread.java)

SearchUserEvent now has 30-second TTL per entry instead of full wipe every 10s
SearchRoomsEvent already had LRU eviction (max 200) — removed redundant .clear() call
Frequently searched users stay cached, only stale entries get cleaned

- scheduledComposers/scheduledTasks — After reading the code, these are actually already handled correctly: processScheduledTasks() swaps the set with a fresh one before processing, and processScheduledComposers() calls .clear() after sending. No leak risk.
2026-03-26 09:59:02 +01:00
..
2024-03-13 11:28:48 +01:00
2026-03-26 09:59:02 +01:00
2026-03-25 12:46:07 +01:00