skip to Main Content

I’m writing a Cesium/Resium app with ~12000 clickable, animated points.
I’m getting the React warning Maximum update depth exceeded.
When there are <5000 points, there’s no warning, but somewhere in the 7-8000 range, I tend to see this warning.
When debugging in the browser, my call stack is a lot of recursivelyTraverseMutationEffects followed by a lot of postMessage (async)

I already eliminated 2 sources of that warning that were silly recursion. I had a useEffectthat was updating its trigger.

Is this warning a sign the app needs to be optimized or a sign that there’s some silly recursive rendering happening?

2

Answers


  1. Chosen as BEST ANSWER

    Yes. It is reasonable to get a React "Maximum update depth exceeded" without accidental recursion. We set the render size to the entities to teeny tiny, and now we can display way more entities before hitting the Maximum update depth exceeded warning. Cesium/Resium struggles to render so many pixels while our app is doing other things in the browser. The stack ends up too tall because we're asking for too much, and not because we're causing a bad update loop.


  2. This is an error, you need to fix it.

    Depending on the full error message, this error means

    • at least that there is unnecessary work done, making your app very slow, or
    • React will stop its work at this error, so your app will likely be broken or have content missing.
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search