command creates garbage collection

39 views
Skip to first unread message

krishna...@juegostudio.net

unread,
Jun 29, 2018, 5:14:58 AM6/29/18
to StrangeIoC
if i dispatch signal in every frame to command in update().. it creates garbage collecton based on size of data.? how to resovle this?

wcorwin

unread,
Aug 1, 2018, 2:45:32 PM8/1/18
to StrangeIoC
Whoops, didn't see this. Can you post a screencap of your profiler with relative info in a deep profile?

krishna...@juegostudio.net

unread,
Aug 1, 2018, 11:46:45 PM8/1/18
to StrangeIoC



I am dispatching signal with deltatime in update to my parallel commands.

wcorwin

unread,
Aug 2, 2018, 1:26:48 AM8/2/18
to StrangeIoC
Yup, it's allocing the object[]. My fault! Should be able to fix easily enough.

krishna...@juegostudio.net

unread,
Aug 2, 2018, 1:28:43 AM8/2/18
to StrangeIoC
yes. i found that. how to resolve it? :)

wcorwin

unread,
Aug 2, 2018, 1:45:54 AM8/2/18
to StrangeIoC
Well, feel free to open it up and follow along :)

I'm cleaning up some GC issues that have been around a while. I fixed armorAgainstInfinite code, now working on binder code. A lot of the iteration can add up.

For Signal we are leaning pretty heavily on the object[] code for command creation and injection. See SignalCommandBinder for more info on that. Essentially we're iterating the payload to create injections, and turning everything in to an object[] makes that easy. I'll see what I can do.

krishna...@juegostudio.net

unread,
Aug 2, 2018, 1:55:14 AM8/2/18
to StrangeIoC

Thanks.. Let us know when u rollout to release later version. :)

wcorwin

unread,
Aug 2, 2018, 1:59:44 AM8/2/18
to StrangeIoC
Honestly, we should just create a more performant version of SignalCommandBinder for the use case of firing commands in each frame. Anything that we know is going to be constantly firing a value should be updating a value, not binding and unbinding it every frame. That's going to cause garbage no matter what. There's some room for normal cleanup, where it's allocating and may not need to (creating a list for no reason, for instance. Can iterate and remove from the data). I'll clean it up as best as I can, but I don't have tons of time to write a new version of SCB right now. Happy to accept volunteers to poke through and clean it up! :)

krishna...@juegostudio.net

unread,
Aug 2, 2018, 2:07:12 AM8/2/18
to StrangeIoC
i am asking about latest Strange Version or any updates. currently it is 1.0.5f. 

Okay. We will also search for alternate solution for this. Agree with first point. Better to have special signal for firing in each frame. I found few days back that empty signal firings to command also creates gc because of Release(). but i will check this again. i am not sure.
Reply all
Reply to author
Forward
0 new messages