#16966 closed defect (fixed)
NANCY: Poor performance spinning around a room
| Reported by: | tunnelsociety | Owned by: | |
|---|---|---|---|
| Priority: | normal | Component: | Engine: Nancy |
| Version: | Keywords: | ||
| Cc: | Game: | Nancy Drew: Curse of Blackmoor Manor |
Description
In any room where we can spin around to see the whole room (e.g. "Gameplay Overview"/tutorial), turning left from a certain point is fine at first, but as we continue left it gradually becomes slower, like a full second or more between turns, until a full rotation is completed -- then it is fast again, and again slows as we turn.
(Turning rightward, it is slow immediately, and gradually gets faster.)
Recording is attached to demonstrate the slowdown, compared to Shadow Ranch.
I continue to experience this when building with -O3, but it is improved from a second or more to somewhat less than a second. (Still very noticeable and somewhat frustrates gameplay: the cursor gets stuck in place during the interruptions, temporarily not responding to mouse movement after releasing the held button.
During the slowdowns, CPU usage briefly goes to ~100%.
I guess it has to do with [re]decoding and [re]seeking a video. I did a little profiling to produce the attached flame graphs. When I spin around in Nancy10 (Shadow Ranch) or earlier, I don't experience this, so I attach a graph for Shadow Ranch to compare.
These graphs are produced from many samples of me spinning around a room for thirty seconds.
(These SVG have some JavaScript and can be viewed interactively in a browser like Firefox: zoom in by clicking a function.)
Blackmoor's graph's leftmost side looks like all of Shadow Ranch's. But the large majority of Blackmoor's graph is Video::VideoDecoder::seekToFrame, which we don't really see in Shadow Ranch's.
ScummVM 2026.3.1git8143-g32091910a7b
Attachments (3)
Change History (5)
by , 3 months ago
| Attachment: | sha-spin.svg added |
|---|
by , 3 months ago
| Attachment: | cur-spin.svg added |
|---|
by , 3 months ago
| Attachment: | recording.mp4 added |
|---|
comment:1 by , 3 months ago
| Owner: | set to |
|---|---|
| Resolution: | → fixed |
| Status: | new → closed |

In 4f18a681: