memgraph / orb

Graph visualization library
Apache License 2.0
364 stars 17 forks source link

Add throttled rendering in the render engine #15

Closed tonilastre closed 2 years ago

tonilastre commented 2 years ago

Currently the issue happens if user runs orb.view.render() within the high volume event like OrbEventType.MOUSE_MOVE, e.g.

orb.events.on(OrbEventType.MOUSE_MOVE, (event) => {
  // Do something
  orb.view.render();
});

The render call by the user will affect the performance because it is an additional render call to the internal rendering. There should be a way to define FPS (frame per second) where the rendering engine would throttle rendering calls in order to satisfy defined FPS.

tonilastre commented 2 years ago

Fixed in release v0.1.3.