I'm looking at rendering large database schemas in JavaScript. Is WebGL2 a practical option, and what should I look for in a diagram engine?
Can WebGL2 handle really large database diagrams?
Answers
Thoth Flow is one option. It's an open-source JavaScript diagram engine that uses WebGL2, with a reported test of 5,000 tables and 7,000 relationships rendering smoothly. That doesn't guarantee the same performance for every schema or device, but it's a useful starting point for your own tests.
It supports React, Vue, Svelte, Web Components, and plain JavaScript, and falls back to Canvas 2D automatically. The fallback is worth testing separately if you expect users without WebGL2 support.
Reply to this answer
Check the dragging behavior as well as the rendering speed. In the reported implementation, tables can be dragged beyond the container by design. That may be handy for moving things across a large diagram, but it might not suit an editor where elements need to stay inside a defined area.
Reply to this answer
Add your answer
Answers are reviewed before publication.
Chai:
A setting to constrain dragging could be useful if different applications need different behavior.