fix: eliminate 8-second teleport freeze on same-map teleport

Replace processAllReadyTiles() with bounded processReadyTiles() in the
same-map teleport and reconnect paths. processAllReadyTiles finalizes
every pending tile synchronously with a GPU sync wait, which caused
8+ second main-thread stalls when many tiles were queued. The bounded
version processes 1-4 tiles per call with async GPU upload — remaining
tiles finalize incrementally over subsequent frames.
This commit is contained in:
Kelsi 2026-03-18 07:54:05 -07:00
parent 14cd6c82b2
commit eca570140a
2 changed files with 10 additions and 9 deletions

View file

@ -279,6 +279,9 @@ public:
/** Process one ready tile (for loading screens with per-tile progress updates) */
void processOneReadyTile();
/** Process a bounded batch of ready tiles with async GPU upload (no sync wait) */
void processReadyTiles();
private:
/**
* Get tile coordinates from GL world position
@ -317,10 +320,6 @@ private:
*/
void workerLoop();
/**
* Main thread: poll for completed tiles and upload to GPU
*/
void processReadyTiles();
void ensureGroundEffectTablesLoaded();
void generateGroundClutterPlacements(std::shared_ptr<PendingTile>& pending,
std::unordered_set<uint32_t>& preparedModelIds);