Performance issue

Hello,
I'm getting large spikes with DispatchIncomingCommands due to FindObjectsOfType. I've been looking at the Photon optimisation tips which suggests SendMonoMessageTargets but SendMonoMessage isn't being called.
I believe this is from RPC's.

Is there anything else I can do to stop FindObjectsOfType being called in this way?



I'm using Unity 5.6.3p4 with PUN v.1.88

Many thanks,
Neil

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    edited January 2018
    Hi @VPGNeilC,

    Thank you for choosing Photon!

    @jeanfabre
    @Christian_Simon
    is this normal?

    Btw @VPGNeilC did you try PUN 2 beta?
  • Hi,

    Can you tell us what kind of RPC you are sending, and do you send Data with It, if yes, what kind of data?

    do you experience the same if you run our demos?

    Regards,

    Jean
  • Hi,
    The RPC's are sent to all others (PhotonTargets.Others) and do have data attached. varying between different data types. I have managed to get some performance back by sending them 1 a frame when they are to be sent so they don't get batched together however, I'm still hit a performance issue with more than 3 players doing the same thing.
    Is FindObjectsOfType affected by the type of data sent in the RPC's or just the quantity of RPC's?

    And no, I wasn't aware of Pun2 so will give that a go too :)

    Thanks,
    Neil
  • Hi,

    I think findObjectsOfType is affected by Data when it serialize unserialize, which is why I;d like to know exactly what you are sending. Maybe there are optimization to do for certain types.

    Bye,

    Jean