Author Topic: SuimonoModule Script Performance  (Read 799 times)

mattis

  • Jr. Member
  • **
  • Posts: 69
    • View Profile
    • Youtube
SuimonoModule Script Performance
« on: November 15, 2017, 05:23:35 PM »
Hello!

This occurs in "SuimonoModule.LateUpdate()

It seems that "FindObjectsOfType" have a performance spike on 59% & Time ms 19,72 , when the whole "SuimonoModule.LateUpdate() have whole 73% GC alloc 3 KB!! and a Time ms up to 24.40!!

What does this reference? Is there anyhow I can optimize it? Or do you have time to update this script ? =)

Instagram: AstralStorm Games
Youtube: AstralStorm Games

Chingwa

  • Administrator
  • Hero Member
  • *****
  • Posts: 1604
    • View Profile
    • Tanuki Digital
Re: SuimonoModule Script Performance
« Reply #1 on: November 15, 2017, 06:06:06 PM »
This is referencing internal objects.  The allocation and delay will get progressively worse with the more game objects you have in your scene.  It also is looking for surface objects in order to cache some components.

For the next update I've removed all instances of this, so it should give better results.  I've instead replaced each FindObjectsOfType() with a local library lookup instead, as well as implemented a Surface registration system so the module isn't constantly looking for water surfaces.

I can send you a preview of version 2.1.5 if you like, just send me an email.  You'll need to replace the old Suimono Module prefab in your scene with the new one.

I'll be officially releasing it sometime in the next week or so.

mattis

  • Jr. Member
  • **
  • Posts: 69
    • View Profile
    • Youtube
Re: SuimonoModule Script Performance
« Reply #2 on: November 18, 2017, 01:49:14 AM »
Okay that sounds good :) I have a BIG world with ALOT pf objects..like 20 000 or so... I can wait for it to go public.. no stress really.
Instagram: AstralStorm Games
Youtube: AstralStorm Games