Strange Mobile CPU Utilisation

0 favourites
  • 3 posts
From the Asset Store
Strange factory themed set of tiles for your platformer game
  • Recently I've been trying to optimise my game for mobile and in doing so discovered something i find really strange. I noticed that whenever i touched the screen the cpu usage would more than half and then go back to its original value shortly after i stopped touching the screen. The cpu usage would remain low so long as I was doing tapping or swiping gestures on the screen. When the cpu usage dropped it would not come at the cost of performance so far as I could tell because the fps remained at a flat 60fps. I was doing a local network preview onto my Samsung S7, with a spritefont displaying my cpu/fps details every second.

    I decided to investigate further and made a temporary event sheet for my layout which only had 2 events, 1 to update the cpu info and one to request browser fullscreen on start of layout. There were no events involving any touch input and yet the same thing happened, this time with cpu usage dropping to 30% of its original value with no effect on fps.

    I even went so far as to remove the 'touch' plugin from the project and even then it happened. This made me think it had something to do with the phone or the browser app but when previewed on desktop browser and clicking the mouse on the screen the cpu usage also dropped in a similar fashion, but not so with keyboard input.

    Any ideas whats going on here?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • See the note about CPUUtilisation in the manual:

    This measurement can be unreliable, especially when the system is largely idle. Most modern devices deliberately slow down the CPU if not fully loaded in order to save power. This means work takes longer to get done, and this expression will misleadingly return a higher measurement, since it's based on timing how long the work takes. It will generally only be reliable in the device's maximum performance mode, i.e. under full load.

    It is probably increasing the CPU power during touches to deal with your inputs, then throttling it back down again when you're not touching. This will affect the timer-based CPU measurement that Construct takes.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)