Photon Handler.Update framerate

Options
Hi! I noticed that when I use PhotonNetwork.ConnectUsingSettings or createRoom the game is lowering the FPS for abount 2 seconds.
Using the profiler I found it was because of PhotonHandler update (deep profiler shows that the most of the CPU usage is generated via some calls to photon dlls from PhotonHandler update).

Is there any way that I can place this updates inside a thread only in that cases to avoid this decrease of the FPS?
Thanks

Comments

  • Tobias
    Options
    Technically, it's possible to move tasks to a thread. But Unity does not approve of threads modifying the scene and objects, so you can't do everything.
    When you connect, we have to setup some secrets for encryption per server. This might cause the stuttering. We plan to work on this.

    You could post the opened deep profiling tree. and let us know where time's spent.
    Update to latest PUN before you do (it got improved).
  • xDura
    Options
    Hi Tobias Sorry for tanking this long to answer but our game was in pre-release stuff that had higher priorities!
    I wanted to post some good news for this discussion! We switched to Unity 5.4 now that is on release and all those issues with framerate (related with connectUsingSettings, joinRoom and changing player.customPropierties) have almost disappeared.
    Thanks!
  • Tobias
    Options
    Thanks for the update! Cool to read that things improved!
    The release of 5.4.0 has a IPv6 issue, which might affect iOS submission. That got fixed in a patch release. Get that, if you plan to submit for iOS.

    PUN v1.74 is in the Asset Store now. It has a few improvements and fixes for 5.4, too.