mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
Performance: ring buffer UBOs, batched load screen uploads, background world preloader
- Replace per-frame VMA alloc/free of material UBOs with a ring buffer in CharacterRenderer (~500 allocations/frame eliminated) - Batch all ready terrain tiles into a single GPU upload during load screen (processAllReadyTiles instead of one-at-a-time with individual fence waits) - Lift per-frame creature/GO spawn budgets during load screen warmup phase - Add background world preloader: saves last world position to disk, pre-warms AssetManager file cache with ADT files starting at app init (login screen) so terrain workers get instant cache hits when Enter World is clicked - Distance-filter expensive collision guard to 8-unit melee range - Merge 3 CharacterRenderer update loops into single pass - Time-budget instrumentation for slow update stages (>3ms threshold) - Count-based async creature model upload budget (max 3/frame in-game) - 1-per-frame game object spawn + per-doodad time budget for transport loading - Use deque for creature spawn queue to avoid O(n) front-erase
This commit is contained in:
parent
71e8ed5b7d
commit
0313bd8692
7 changed files with 390 additions and 121 deletions
|
|
@ -2527,7 +2527,13 @@ void Renderer::update(float deltaTime) {
|
|||
|
||||
// Update terrain streaming
|
||||
if (terrainManager && camera) {
|
||||
auto terrStart = std::chrono::steady_clock::now();
|
||||
terrainManager->update(*camera, deltaTime);
|
||||
float terrMs = std::chrono::duration<float, std::milli>(
|
||||
std::chrono::steady_clock::now() - terrStart).count();
|
||||
if (terrMs > 5.0f) {
|
||||
LOG_WARNING("SLOW terrainManager->update: ", terrMs, "ms");
|
||||
}
|
||||
}
|
||||
|
||||
// Update sky system (skybox time, star twinkle, clouds, celestial moon phases)
|
||||
|
|
@ -2579,7 +2585,14 @@ void Renderer::update(float deltaTime) {
|
|||
|
||||
// Update character animations
|
||||
if (characterRenderer && camera) {
|
||||
auto charAnimStart = std::chrono::steady_clock::now();
|
||||
characterRenderer->update(deltaTime, camera->getPosition());
|
||||
float charAnimMs = std::chrono::duration<float, std::milli>(
|
||||
std::chrono::steady_clock::now() - charAnimStart).count();
|
||||
if (charAnimMs > 5.0f) {
|
||||
LOG_WARNING("SLOW characterRenderer->update: ", charAnimMs, "ms (",
|
||||
characterRenderer->getInstanceCount(), " instances)");
|
||||
}
|
||||
}
|
||||
|
||||
// Update AudioEngine (cleanup finished sounds, etc.)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue