Overview render on request

When rendering approx 10K nodes in my diagram; rendering the overview is quite computationally expensive. Would it be possible to update the overview state on request, e.g. on a model changed event? So the desired behavior for the overview:

  • Render the overview on load
  • Render the viewport rect when the viewport moves
  • Do not update the overview when we drag items in the diagram
  • Update the overview when we release an item, e.g. model change event

Note: I am aware of the hidden updateDelay property but this still makes the diagram “hang” every update delay while interacting for a large number of nodes. So doing an update on mouse release after a drag action has finished would be better here.

The quick answer is no. I can look into it when I get some free time.

Thanks for your response, we will stick with the hidden updateDelay property for now then; let us know if there are any updates regarding this topic.

In v2.1.47 and later you’ll be able to call redraw, another undocumented method.

It’s undocumented because we don’t want people calling it when they are desperate to get some change that they’ve made showing in their viewport, so they’re trying whatever they can find. But usually the problem is that they forgot to notify the model or diagram about a change (i.e. not in a transaction), or their change is supposed to be unseen (offscreen or collapsed or transparent or occluded by something else). When they figure it out, they often leave the calls to the “bad” methods in, causing problems.

Thank! So you would suggest setting the updateDelay to inf and calling the redraw manually?

You’ll have to try it to make sure that will work for your app.