Description
HD textures are loaded lazily on first use (HdObjectManager / HdCostumeManager texture caches with synchronous PNG decode). The first time an asset is displayed — an object, a costume or a background — the frame rate drops noticeably for a moment, then returns to stable levels.
Observed e.g. in the cannon scene (room 10): the first time the skeleton boats render, there is a visible hitch; subsequent frames are smooth.
Likely cause
Synchronous loadObject / loadCostume / loadBackground (PNG decode + cache insert) running inside the render path (renderHDComposite), blocking the frame while a large texture is decoded.
Possible directions
- Preload / prewarm the texture cache when entering a room
- Asynchronous (background) texture loading
- Move decode out of the render path
Environment
- comiupscale ScummVM fork, HD mode 4x (2560x1920)
- Reproduced headless and on desktop
Description
HD textures are loaded lazily on first use (HdObjectManager / HdCostumeManager texture caches with synchronous PNG decode). The first time an asset is displayed — an object, a costume or a background — the frame rate drops noticeably for a moment, then returns to stable levels.
Observed e.g. in the cannon scene (room 10): the first time the skeleton boats render, there is a visible hitch; subsequent frames are smooth.
Likely cause
Synchronous
loadObject/loadCostume/loadBackground(PNG decode + cache insert) running inside the render path (renderHDComposite), blocking the frame while a large texture is decoded.Possible directions
Environment