playMaker

Author Topic: is getProperty.onUpdate high cost ?  (Read 566 times)

blackant

  • Hero Member
  • *****
  • Posts: 521
  • http://blackantmaster.com
    • blackantmaster.com
is getProperty.onUpdate high cost ?
« on: November 29, 2021, 04:47:25 AM »
Hi,

i'am trying to optimize my game with profiler, and noticed that this action is  looking a bit expensive in the garbage collector.
but i am a total noob in terms of performing, that why i said ... i'm trying...  ::)

regarding the screenshot, i can certainly find some other way to optimize my game and the way i use FSMs, and i wonder if using Get/Set property is higher cost than tipping a custom script that will refer directly to  the desirer object type ?

if (i can gain some fps)
{
     i'll spend some time writing more actions;
     then IllBeHappy();
     And then PlayersWillBeToo( :P);
}

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7614
    • jinxtergames
Re: is getProperty.onUpdate high cost ?
« Reply #1 on: November 29, 2021, 10:59:38 AM »
Hi.
Get/Set property is mirroring scripts, therefore its slower than dedicated actions.

Something that can hit performance is for example having a lot of raycasts going on every frame.
Also Create/Destroy objects

blackant

  • Hero Member
  • *****
  • Posts: 521
  • http://blackantmaster.com
    • blackantmaster.com
Re: is getProperty.onUpdate high cost ?
« Reply #2 on: December 01, 2021, 02:59:18 AM »
yeah, i can confirm, i have replaced the get/set property with my actions and it's working better.