Photon C++ Client Library 4.0.0.0 performance slows down

iwahara
iwahara
edited January 2015 in Native
Hi.

I'm trying to update Photon for iOS from ver.3.2.5.5 to ver.4.0.0.0.
But when a peer received data more than 10K byte, its performance slows down terribly, and I get a warning shown below:
WARNING! There are 100 outgoing acknowledgements waiting in the queue!

I have never encountered this in older version.

How should I do?

Comments

  • Hi iwahara.

    Please navigate to Client.cpp line 1028 and change it from
    [code2=cpp]EGLOG(DebugLevel::ALL, L"%ls", eventData.toString(true).cstr()); // don't print out the payload here, as that can get too expensive for big events[/code2]
    to
    [code2=cpp]EGLOG(DebugLevel::INFO, L"%ls", eventData.toString().cstr()); // don't print out the payload here, as that can get too expensive for big events[/code2]

    Please note the removed true in the second code snippet.

    As the comment reveals and as it is explained in the toString() documentation at http://doc-api.exitgames.com/en/realtim ... 5d2bebb276 the cost of passing true for printing the formatted payload of an event increases disproportionally high with the the payload size of that event. For events that are multiple kb in size this can get expensive enough to massively slow down the overall performance.

    It looks like we have changed this line during debugging and this change accidentally made it into the release.
    3.2.5.5 does not pass true in that line and neither should 4.0.0.0.
    We will fix this for the next release. Until then please apply the change that I have described above yourself.
  • Hi Kaiserludi.

    Thanks for your reply.
    I'll try your advice.