constellation-app / constellation

A graph-focused data visualisation and interactive analysis application.
https://constellation-app.com
Apache License 2.0
385 stars 59 forks source link

Performance issues with Timeline View when using large graphs. #2163

Open OrionsGuardian opened 1 month ago

OrionsGuardian commented 1 month ago

Prerequisites

Description

Performance of Constellation is significantly impacted by the Timeline View.

One of the Core values with Constellation is for it to be a performant application.

Core Values

Performance over Functionality

The most important value is making sure Constellation stays performant. If this means we have to sacrifice some functionality if it will degrade performance then that’s what we will do. Features are “easy” to add but keeping the application performant is harder.

Steps to Reproduce

Run Constellation without any views open. If any views are already open, then close them all and close Constellation and start Constellation again. (in particular, ensure the Timeline view is not open after restarting Constellation)

Create a new graph. Build a structured graph using the menu option: Experimental -> Build Graph -> Structured Graph Builder Use the default settings and click the Build button. It should create a graph with around 50k nodes and 50k transactions. It should complete in around 30 seconds (or longer on slower / low spec machines)

Now, if you open the Timeline view, it can take over 10 minutes for the View to complete its processing. If you have multiple other views open, it may not complete processing the Timeline data at all and leave you with a locked graph. Also, while it's processing the Timeline, if you have Autosave enabled, it will often get stuck doing an Autosave write state for some view data that is stored in the graph file.

We need to improve the Timeline View performance and/or revise how it handles large graphs.

Expected behaviour: Performance should be in line with other views for large graphs

Actual behaviour: Performance becomes drastically worse than other views when dealing with large graphs

Reproduces how often: 100%