You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried turning on stacking for a timeline with a few hundred events. But the timeline no longer renders smoothly while I zoom in.
I checked the code, and the stack function is pretty inefficient. Each time it adds a new item, it checks for collisions with every other item. If it finds a collision, it tries shifting the new item to the next row, and checks for collisions with every item again. If the number of rows required is large, that's an O(n^3) algorithm.
Gentlemen, I am interested in resolving this issue and Im up on paying for this improvement. Is anybody available to make a bugfix for this?
Sometimes I have very large charts (40-50 separate lines with about 1000 elements in each ) with thousands of items to display and page gets completely unresponsive.
I tried turning on stacking for a timeline with a few hundred events. But the timeline no longer renders smoothly while I zoom in.
I checked the code, and the stack function is pretty inefficient. Each time it adds a new item, it checks for collisions with every other item. If it finds a collision, it tries shifting the new item to the next row, and checks for collisions with every item again. If the number of rows required is large, that's an O(n^3) algorithm.
There's a greedy algorithm for this that's O(n log n) instead - see the notes on interval partitioning here: https://www.cs.princeton.edu/~wayne/kleinberg-tardos/pearson/04GreedyAlgorithms-2x2.pdf.
If you'd like, I can try fixing this myself and sending a pull request.
The text was updated successfully, but these errors were encountered: