You've already forked Arcturus-Morningstar-Extended
mirror of
https://github.com/duckietm/Arcturus-Morningstar-Extended.git
synced 2026-06-19 15:06:19 +00:00
f2d8f109ff
- 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.