Does 4k array length (vec3 and bool) cause the freeze?

Options

Hello, we want to try sync trailrenderer which is used to draw something. We wrote custom trailrenderer tracker script which tracks all points and also track new points (last 1-10. Depends on the setting).

Since trailrenderer does not save emitting state for everypoint we have 2 arrays. One with points one with booleans.

We need to send this for the first time joiner to have the current points.

At the moment it works ok but sometimes the editor freezes. The console says it is around 4k elements (combined).

My quesion is can this cause the freeze? This happens sometimes. I am not exactly sure because sometimes it never happens but if it starts freezing on join it is too long and you get disconnected. Or does photon in the background split the message into small pieces?

Best Answers

  • Tobias
    Tobias admin
    Answer ✓
    Options

    Yes, a 4k array of Vector3 will cause issues but it should not freeze the editor. I would guess it is a follow up issue. Maybe the size of what you send goes over a limit.

    Yes, Photon fragments a large message into smaller ones which can pass all routers that might connect your machine with the server and others.

    Maybe you can compress the data or keep it shorter?

  • MaZy
    MaZy
    Answer ✓
    Options

    Hey thanks for the answer. I found out it was a coding problem. I cannot remember exactly but it was something like sending the array with increased size over and over again. Now since this is fixed and sents only one time at start everything is smooth and working like it should be.

Answers

  • Tobias
    Tobias admin
    Answer ✓
    Options

    Yes, a 4k array of Vector3 will cause issues but it should not freeze the editor. I would guess it is a follow up issue. Maybe the size of what you send goes over a limit.

    Yes, Photon fragments a large message into smaller ones which can pass all routers that might connect your machine with the server and others.

    Maybe you can compress the data or keep it shorter?

  • MaZy
    MaZy
    Answer ✓
    Options

    Hey thanks for the answer. I found out it was a coding problem. I cannot remember exactly but it was something like sending the array with increased size over and over again. Now since this is fixed and sents only one time at start everything is smooth and working like it should be.