Opened 3 months ago

Closed 2 weeks ago

Last modified 11 days ago

#15347 closed defect (fixed)

HYPNO: Bad performance under Android in menu of Spider Man: Sinister Six

Reported by: lephilousophe Owned by: eriktorbjorn
Priority: high Component: Engine: Hypno
Version: Keywords:
Cc: Game:

Description

With profiling, we can see that Hypno::HypnoEngine::changeCursor is called very often.
This one spends many time opening files (using Android SAF which is slow) and decoding the image.
The cursor should only be decoded when it actually needs to be changed.

Attachments (1)

flamegraph_hypno.png (256.0 KB ) - added by lephilousophe 3 months ago.

Download all attachments as: .zip

Change History (8)

by lephilousophe, 3 months ago

Attachment: flamegraph_hypno.png added

comment:1 by tag2015, 2 months ago

Summary: Bad performance under Android in menu of Spider Man: Sinsiter SixHYPNO: Bad performance under Android in menu of Spider Man: Sinister Six

comment:2 by eriktorbjorn, 2 weeks ago

I've submitted a possible fix, but I have no way of testing it on Android: https://github.com/scummvm/scummvm/pull/6219

comment:3 by eriktorbjorn, 2 weeks ago

Priority: normalhigh

Would be good to resolve this for the 2.9.0 release.

comment:4 by Torbjörn Andersson <eriktorbjorn@…>, 2 weeks ago

In a5d3e075:

HYPNO: Cache Smacker cursors, hopefully improving performance (bug #15347)

At least in Spider Man: Sinister Six the cursor is constantly being
changed to the current cursor, and since that involves decoding a
Smacker file it is apparently quite slow on Android. Possibly on other
systems as well.

The cursor doesn't actually change, though - it is not animated - so by
remembering the previously decoded cursor we can cut down on unnecessary
file access.

comment:5 by bluegr, 2 weeks ago

Owner: changed from neuromancer to eriktorbjorn
Resolution: fixed
Status: newclosed

comment:6 by neuromancer, 2 weeks ago

This was tested on Linux desktop, but not in Android. Can someone confirm it works better there?

comment:7 by lephilousophe, 11 days ago

Confirmed.

Note: See TracTickets for help on using tickets.