Files
Arcturus-Morningstar-Extended/Emulator
duckietm 95aea934bd 🆙 Fix rooms loading
- Layout Cache (eliminates 1 DB query per room load)

Standard room models (model_a, model_b, etc.) are loaded once at startup and cached in memory
RoomLayout gets a new constructor from cached data instead of ResultSet
~99% of rooms use standard models, so this saves a DB round-trip on nearly every room load

- Better Parallel Pipeline (reduced critical path)

Before: layout → [items|rights|wordfilter] → heightmap → [bots|pets|wired]
After:  layout → [items|rights|wordfilter|bots|pets] → [heightmap|wired]

Bots and pets only need layout for positioning, not items - so they now start immediately
Wired only needs items loaded (not heightmap) - so it now runs parallel with heightmap

-  Deferred Promotion Query (faster Room instantiation)

Moved room_promotions DB query from constructor to loadDataInternal() as an async task
Room constructor now only runs bans query (needed for entry check)
Saves ~20ms per Room instantiation for promoted rooms

-  Smart Heightmap (reduced tile iterations by 80-95%)

Instead of updating ALL tiles (1024 for 32x32 room), only updates tiles with items on them
Uses getTilesAt() for correct rotation-aware multi-tile coverage
For a room with 100 items on a 32x32 grid: ~200 tile updates instead of 1024
2026-03-26 12:44:12 +01:00
..
2024-03-13 11:28:48 +01:00
2026-03-26 12:44:12 +01:00
2026-03-25 12:46:07 +01:00