playMaker

Author Topic: Getting rid of console spam  (Read 2313 times)

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Getting rid of console spam
« on: April 27, 2020, 07:47:20 AM »
Hi guys,

i'm doing some testing and i'd really like to omit some warnings if possible to cut down on the log size. Right now i'm getting spammed by:

AddEventHandlerComponent: PlayMakerFixedUpdate
AddEventHandlerComponent: PlayMakerLateUpdate
AddEventHandlerComponent: PlayMakerCollisionEnter2D

which i really don't need :)
Available for Playmaker work

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Getting rid of console spam
« Reply #1 on: April 28, 2020, 02:24:12 AM »
Hi,

 you can control that in the playmaker preferences I believe. I never get it, so I am not even sure where to look for that. Is it when you add an action to an fsm or when the scene starts to play?

Bye,

 Jean

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Re: Getting rid of console spam
« Reply #2 on: May 03, 2020, 09:02:19 AM »
When the scene starts to play in the build.
Available for Playmaker work

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Getting rid of console spam
« Reply #3 on: May 05, 2020, 02:49:20 AM »
Hi,

 Which version of PlayMaker is it exactly?

Bye,

 Jean

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Re: Getting rid of console spam
« Reply #4 on: December 01, 2021, 11:36:22 PM »
Bump. Sorry, i missed the question and it's kinda needed quickly now since the game is in porting.

1.9.1.b17. Unity 2019.4.29f1, PS4 build

I'm getting spammed with the following and it's affecting the build performance:

05:00:52    variableLookup already contains: NewHitPointsFloat
05:00:52    Variables are of different type: Int Float
05:00:52    UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
05:00:52    UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
05:00:52    UnityEngine.Logger:Log(LogType, Object)
05:00:52    UnityEngine.Debug:LogWarning(Object)
05:00:52    HutongGames.PlayMaker.FsmVariables:AddVariableLookup(NamedVariable)
05:00:52    HutongGames.PlayMaker.FsmVariables:Init()
05:00:52    HutongGames.PlayMaker.FsmVariables:get_variableLookup()
05:00:52    HutongGames.PlayMaker.FsmVariables:GetVariable(String)
05:00:52    HutongGames.PlayMaker.FsmVariables:GetFsmGameObject(String)
05:00:52    HutongGames.PlayMaker.Fsm:GetFsmGameObject(String)
05:00:52    HutongGames.PlayMaker.ActionData:GetFsmGameObject(Fsm, Int32)
05:00:52    HutongGames.PlayMaker.ActionData:LoadActionField(Fsm, Object, FieldInfo, Int32)
05:00:52    HutongGames.PlayMaker.ActionData:CreateAction(Context, Int32)
05:00:52    HutongGames.PlayMaker.ActionData:LoadActions(FsmState)
05:00:52    HutongGames.PlayMaker.FsmState:LoadActions()
05:00:52    HutongGames.PlayMaker.Fsm:InitData()
05:00:52    PlayMakerFSM:OnAfterDeserialize()

and

AddEventHandlerComponent: PlayMakerFixedUpdate
UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
 UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:Log(Object)
PlayMakerFSM:AddEventHandlerComponents()
PlayMakerFSM:Init()
PlayMakerFSM:Awake()
UnityEngine.Object:Internal_InstantiateSingle_Injected(Object, Vector3&, Quaternion&)
UnityEngine.Object:Internal_InstantiateSingle(Object, Vector3, Quaternion)
UnityEngine.Object:Instantiate(Object, Vector3, Quaternion)
DarkTonic.CoreGameKit.PoolBoss:InstantiateForPool(Transform, Int32)
DarkTonic.CoreGameKit.PoolBoss:FillItemPool(PoolBossItem, Transform, Action)
DarkTonic.CoreGameKit.PoolBoss:CreatePoolItemClones(PoolBossItem, Boolean, Action)
DarkTonic.CoreGameKit.PoolBoss:ContinueInit()
DarkTonic.CoreGameKit.PoolBoss:Initialize()
DarkTonic.CoreGameKit.PoolBoss:Awake()

« Last Edit: December 02, 2021, 09:49:58 AM by Fat Pug Studio »
Available for Playmaker work

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Re: Getting rid of console spam
« Reply #5 on: December 02, 2021, 08:39:57 AM »
Basically, as far as i have seen, adding event handlers greatly slows down the instantiation of the clones in pool.
Available for Playmaker work

banjolasse

  • Playmaker Newbie
  • *
  • Posts: 1
Re: Getting rid of console spam
« Reply #6 on: November 11, 2022, 04:35:51 AM »
If anyone comes across this problem, try adding
Code: [Select]
PlayMakerPrefs.LogPerformanceWarnings = false;to Awake() in a some file.

That bool might be togglable somewhere in the editor, but I couldn't find it.

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Re: Getting rid of console spam
« Reply #7 on: November 11, 2022, 02:06:56 PM »
Thanks.
Available for Playmaker work

mrphilipjoel

  • Playmaker Newbie
  • *
  • Posts: 48
Re: Getting rid of console spam
« Reply #8 on: December 21, 2023, 11:42:39 AM »
If anyone comes across this problem, try adding
Code: [Select]
PlayMakerPrefs.LogPerformanceWarnings = false;to Awake() in a some file.

That bool might be togglable somewhere in the editor, but I couldn't find it.

Interesting this removed those logs, because its an experiemental feature that is not enabled by default (although its been a year, so maybe things have changed).

I recently enabled it in my own project, to see if it would help me identify why my FPS is bad, but it didn't seem to generate anything new in the console for me.

I have attached a picture showing how to enable/disable it in Playmaker Prefs. But, I'll probably also try your code to see if it gives me a performance boost.