playMaker

Author Topic: Profiler - GUI.Repaint consume %33 of CPU - Is this Normal?  (Read 1673 times)

ergin

  • Junior Playmaker
  • **
  • Posts: 86
    • View Profile
Hello for the game I am developing right now GUI.Repaint consume %33 of CPU, Is this Normal?



game's youtube video
https://www.youtube.com/watch?v=mnXeekL9mcA

Thanks.

ergin

  • Junior Playmaker
  • **
  • Posts: 86
    • View Profile
Re: Profiler - GUI.Repaint consume %33 of CPU - Is this Normal?
« Reply #1 on: May 27, 2016, 06:58:32 AM »
I turned off Admob, it had no effect, I turned on deep profile:

ergin

  • Junior Playmaker
  • **
  • Posts: 86
    • View Profile
Re: Profiler - GUI.Repaint consume %33 of CPU - Is this Normal?
« Reply #2 on: May 27, 2016, 07:25:44 AM »
:) After deep profile, to test if its the State Labels, I turned off "Show State Labels in Game" from Preferences / Debugging. This time game really slowed down:

Even If I turned it back-on or restarted the Unity frame rate dropped to 15fps

Unity 5.3.2f1- Playmaker 1.8.1


ergin

  • Junior Playmaker
  • **
  • Posts: 86
    • View Profile
Re: Profiler - GUI.Repaint consume %33 of CPU - Is this Normal?
« Reply #3 on: May 27, 2016, 07:54:40 AM »
Sorry, I guess my bad... I turned off Enable Logging it turned to normal.

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3201
  • Official Playmaker Support
    • View Profile
    • LinkedIn
Re: Profiler - GUI.Repaint consume %33 of CPU - Is this Normal?
« Reply #4 on: May 27, 2016, 07:56:58 AM »
It's important to look at the ms, not just the percentage. In your first screenshot you're talking about less than 1ms. Unity's OnGUI actions are not super efficient, but often good enough. Were you seeing frame rate issues?

In the last screenshot it looks like something is spamming the debug console, causing the massive slowdown. What's in your console?

EDIT: Saw your note about logging. I would still try to track down what's spamming the console. You shouldn't have to turn off logging.

EDIT: Also are you using GUI actions?
« Last Edit: May 27, 2016, 08:00:54 AM by Alex Chouls »

ergin

  • Junior Playmaker
  • **
  • Posts: 86
    • View Profile
Re: Profiler - GUI.Repaint consume %33 of CPU - Is this Normal?
« Reply #5 on: May 27, 2016, 08:40:33 AM »
Thanks Alex,

I guess I unintentionaly clicked "Forward Playmaker Log to Unity Log" It's the playmakers log. :)

I am constantly looking for ways to decrease cpu consumption, and regularly checking profiler as it is a mobile game, actually I am not super-satisfied with my frame-rates. I am trying to keep min. req. to Dual-core 1.2 GHz and Vivante GC1000 which sometimes drops below 30.

I am not using any GUI actions.

Thanks.

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3201
  • Official Playmaker Support
    • View Profile
    • LinkedIn
Re: Profiler - GUI.Repaint consume %33 of CPU - Is this Normal?
« Reply #6 on: May 27, 2016, 08:46:52 AM »
If you're not using GUI actions you can remove the PlayMakerGUI GameObject from the scene when you make a build (you might want to keep it around to debug in the editor). Also un-check "Automatically Add PlayMakerGUI" in Preferences.

When you checked "Forward Playmaker Log to Unity Log" was it just state transitions spamming the console, or any particular action?

ergin

  • Junior Playmaker
  • **
  • Posts: 86
    • View Profile
Re: Profiler - GUI.Repaint consume %33 of CPU - Is this Normal?
« Reply #7 on: May 27, 2016, 09:17:52 AM »
It's just the state transitions. I'm using "wait" 0.1 and make distance and bool comparisons to spawn or reposition game objects which is technically a loop and that floods the playmaker transitions in the log.

Thanks.

coxy17

  • Sr. Member
  • ****
  • Posts: 306
    • View Profile
Re: Profiler - GUI.Repaint consume %33 of CPU - Is this Normal?
« Reply #8 on: January 24, 2017, 01:16:23 AM »
Hi Ergin

I think i have the same issue you had but not sure, do you have any tips you could share with me as im new to using the profiler and should of really started using it when i first started my game. So much to learn.