Hacker News new | ask | show | jobs
by cizl 1368 days ago
Cosmos really looks amazing when it comes to performace. Besides visual rendering on the GPU, they also do the graph layout simulation calculations on the GPU as well, which is a first. SigmaJS for example uses graphology for the calculations, and WebGL for rendering.

Cosmos is a really new lib, so when we did our initial research it wasn't even out yet. You can read more about our research over here: https://memgraph.com/blog/you-want-a-fast-easy-to-use-and-po...

From what we've understood, it's somewhat limited when it comes to graph styling. But an amazing technology nontheless.

1 comments

I'm currently using vis-network [1] as the graph display for a Fraud analysis UI. Cosmos looked really good when I checked it but as you very well mention it wasn't able to style vertices with different images/icons and not sure if it was able to style edges color and width. All of this is heavily used in my use case. Hopefully it gets these features as it matures

[1] https://github.com/visjs/vis-network

vis-network is a great library. We actually started with it because we liked the API, the styling capabilities, easy to use event handlers. But we experienced performance issues when we wanted to simulate and render larger graphs because it was done in the main thread, the whole UI was blocked by it. We tried to fix it in vis, but simulation was using DOM so it was super hard to split simulation and renderer.

Actually that was the main reason (along with the note that main authors are not contributing to visjs any more [1]) for a creation of the Orb where we fixed the blocking UI issue with graph simulation. Orb engine has two parts now:

* Simulator that doesn't depend on the DOM so we can move its heavy calculation to the web worker - we use d3-force for it [2]

* Renderer is pretty much influenced by vis-network, using similar style mechanism and canvas drawing capabilities (we credited vis-network in our code for those sections)

[1] https://github.com/almende/vis/issues/4259#issue-412107497

[2] https://github.com/d3/d3-force