diff --git a/include/core/application.hpp b/include/core/application.hpp index 28116152..de5280ff 100644 --- a/include/core/application.hpp +++ b/include/core/application.hpp @@ -344,7 +344,8 @@ private: std::unordered_map onlinePlayerAppearance_; std::unordered_map, std::array>> pendingOnlinePlayerEquipment_; // Deferred equipment compositing queue — processes max 1 per frame to avoid stutter - std::vector, std::array>>> deferredEquipmentQueue_; + // deque: consumed from front in a loop; vector::erase(begin) would be O(n²). + std::deque, std::array>>> deferredEquipmentQueue_; void processDeferredEquipmentQueue(); // Async equipment texture pre-decode: BLP decode on background thread, composite on main thread struct PreparedEquipmentUpdate { @@ -402,7 +403,7 @@ private: uint8_t facialFeatures; float x, y, z, orientation; }; - std::vector pendingPlayerSpawns_; + std::deque pendingPlayerSpawns_; std::unordered_set pendingPlayerSpawnGuids_; void processPlayerSpawnQueue(); std::unordered_set creaturePermanentFailureGuids_; @@ -415,7 +416,7 @@ private: float x, y, z, orientation; float scale = 1.0f; }; - std::vector pendingGameObjectSpawns_; + std::deque pendingGameObjectSpawns_; void processGameObjectSpawnQueue(); // Async WMO loading for game objects (file I/O + parse on background thread)