edited June 2020 in ORK Support
I've been trying to track down some lag spikes in events; and I think I've found that calling certain (not all!) Makinom Machines via the plugin nodes inside of ORK events seem to be causing them, and I like using them quite a lot!

I'm still using an earlier version (ORK 2.26.1) (Makinom 1.15.0) for stability reasons; don't want to break things if at all possible!

Have there been any performance improvements for this particular scenario since my version? Or maybe there's a method I can use for better performance?

https://i.imgur.com/xqhEkYj.png (Profiler)

https://i.imgur.com/Gz3JBDf.png (Disabling these nodes will remove the ORKHandler.Update() Spike)

EDIT:

Actually, upon further testing, it's only the Camerashake Machines that are causing the spike in this example scenario, which is even weirder, since they're extremely simple machines: just a simple Call Function.

https://i.imgur.com/Kq5wfkq.png (Problematic Makinom Machine being called from ORK)
Post edited by Kirb on
Tactics RPG Grid Battle System for ORK
---------------------------------------
Personal Twitter: https://twitter.com/AMO_Crate
I make RFI! https://twitter.com/NootboxGames
  • Why are you even using a Makinom machine for that - you can use ORK's Call Function node to do that as well :)
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited June 2020
    To be honest, it's a huge, huge QoL and time-saving measure for me!

    I can keep constantly-used chunks of code I need in various machines, and it's a lot easier to simply call a makinom machine that does what I need it to do, rather than having to both remember how to do and manually add a complex sequence in ORK every time; especially since I can't easily copy nodes in ORK like I can in Makinom.

    This also has the big benefit of being able to only modify a single makinom schematic when I need to change something instead of 300+(!) events. D:
    Post edited by Kirb on
    Tactics RPG Grid Battle System for ORK
    ---------------------------------------
    Personal Twitter: https://twitter.com/AMO_Crate
    I make RFI! https://twitter.com/NootboxGames
  • edited June 2020
    image

    Ran a deep profile as well, it seems like it's caused by a really expensive reflection call, in this case, if that helps at all.
    Post edited by Kirb on
    Tactics RPG Grid Battle System for ORK
    ---------------------------------------
    Personal Twitter: https://twitter.com/AMO_Crate
    I make RFI! https://twitter.com/NootboxGames
  • Hm, generally, only the first reflection call for something should be costly (finding the class, etc.), as the stuff will be cached for faster access in future calls.

    Is this happening each call, or just for the first one?

    You could invest a bit of time and write a custom node to directly access the component/functionality instead of using reflection. E.g. just copying one of the existing node's classes. You don't even need to recompile Makinom (or ORK) to add custom nodes, just having the script in your Unity project is enough (and I think using the correct namespace, e.g. Makinom.Schematics.Nodes for Makinom).
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.