mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
perf: limit NPC composite texture processing to 2ms per frame
processAsyncNpcCompositeResults() had no per-frame budget cap, so when many NPCs finished async skin compositing simultaneously (e.g. right after world load), all results were finalized in a single frame causing up to 284ms frame stalls. Apply the same 2ms budget pattern used by processAsyncCreatureResults. Load screen still processes all pending composites without the cap (unlimited=true).
This commit is contained in:
parent
ac0fe1bd61
commit
dc2aab5e90
2 changed files with 13 additions and 3 deletions
|
|
@ -361,7 +361,7 @@ private:
|
|||
std::future<PreparedNpcComposite> future;
|
||||
};
|
||||
std::vector<AsyncNpcCompositeLoad> asyncNpcCompositeLoads_;
|
||||
void processAsyncNpcCompositeResults();
|
||||
void processAsyncNpcCompositeResults(bool unlimited = false);
|
||||
// Cache base player model geometry by (raceId, genderId)
|
||||
std::unordered_map<uint32_t, uint32_t> playerModelCache_; // key=(race<<8)|gender → modelId
|
||||
struct PlayerTextureSlots { int skin = -1; int hair = -1; int underwear = -1; };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue