playMaker

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

ergin

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

ergin

  • Junior Playmaker
  • **
  • Posts: 86
Re: Profiler - GUI.Repaint consume %33 of CPU - Is this Normal?
« Reply #2 on: May 27, 2016, 10: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
Re: Profiler - GUI.Repaint consume %33 of CPU - Is this Normal?
« Reply #3 on: May 27, 2016, 10:54:40 AM »
Sorry, I guess my bad... I turned off Enable Logging it turned to normal.

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: Profiler - GUI.Repaint consume %33 of CPU - Is this Normal?
« Reply #4 on: May 27, 2016, 10: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, 11:00:54 AM by Alex Chouls »

ergin

  • Junior Playmaker
  • **
  • Posts: 86
Re: Profiler - GUI.Repaint consume %33 of CPU - Is this Normal?
« Reply #5 on: May 27, 2016, 11: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: 3987
  • Official Playmaker Support
    • LinkedIn
Re: Profiler - GUI.Repaint consume %33 of CPU - Is this Normal?
« Reply #6 on: May 27, 2016, 11: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
Re: Profiler - GUI.Repaint consume %33 of CPU - Is this Normal?
« Reply #7 on: May 27, 2016, 12:17:52 PM »
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

  • Beta Group
  • Sr. Member
  • *
  • Posts: 355
Re: Profiler - GUI.Repaint consume %33 of CPU - Is this Normal?
« Reply #8 on: January 24, 2017, 03: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.


Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Re: Profiler - GUI.Repaint consume %33 of CPU - Is this Normal?
« Reply #9 on: October 11, 2020, 02:14:15 PM »
This is currently the bane of my existance with no solution in sight.
Available for Playmaker work

Broken Stylus

  • Beta Group
  • Hero Member
  • *
  • Posts: 772
Re: Profiler - GUI.Repaint consume %33 of CPU - Is this Normal?
« Reply #10 on: November 20, 2020, 02:04:00 PM »
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.

96 ms, that's a lot but is it caused by the editor? in this case, have you tried to run on full screen?
Or are you profiling on a connected device (development for a mobile app)?

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: Profiler - GUI.Repaint consume %33 of CPU - Is this Normal?
« Reply #11 on: December 08, 2020, 02:38:07 PM »
This is currently the bane of my existance with no solution in sight.

I thought the issue had been tracked to logging (which is very slow in the Unity editor). Is there another issue? Sorry, there are a few different issues discussed in the thread, and want to make sure I'm investigating the right thing!