Skip to content

Support event optimisation for graph batch updates #1516

Description

@PieterT2000

Is your feature request related to a problem? Please describe.
Unless I have overlooked something, it seems that Sigma.js nor Graphology support temporarily pausing the firing of events when doing a lot of sequential updates to a graph instance.
Say that you have an existing immutable graph G. You can add multiple nodes/edges in bulk using the G.import method, but individual events will still be triggered for each node/edge.

Note: if this is already supported, please let me know 😀

Describe the solution you'd like
It would be great to have something akin to the suspendEvents and resumeEvents functions in Cesium.js.

Describe alternatives you've considered
An alternative is to replace the graph instance in Sigma. However, this does not work well in React Sigma. I'd rather keep the immutability constraints in place.

Additional context
Relevant dependencies:

{
  "dependencies": {
    "@react-sigma/core": "^5.0.2",
    "sigma": "^3.0.1",
    "graphology": "^0.25.4",
  }
}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions