anvaka / anvaka/graph-drawing-libraries

cpettitt/dagre performance

Open
#8 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
622
Forks
44
PR merge metrics
No merged PRs in 30d

Description

@cpettitt I wrote a simple script which lets users render graphs from [graph generators](https://github.com/anvaka/ngraph.generators) library with dagre.

First of all, your library does very interesting layouts and usually very fast! I just wanted to show the [source code](https://github.com/anvaka/graph-drawing-libraries/blob/master/src/src/scripts/examples/cpettitt_dagre/02.perf/index.html) to you. Is there any way we could make it run even faster?

Here are some examples (**warning** don't try this on mobile phone. It may kill the browser):
## Grid 10x10

[dagre](http://anvaka.github.io/graph-drawing-libraries/examples/cpettitt_dagre/02.perf/)
[vis](http://anvaka.github.io/graph-drawing-libraries/examples/almende_vis/02.perf/)
[vivagraph](http://anvaka.github.io/graph-drawing-libraries/examples/anvaka_VivaGraphJS/02.perf/)
## Grid 100x10

[dagre](http://anvaka.github.io/graph-drawing-libraries/examples/cpettitt_dagre/02.perf/?n=100)
[vis](http://anvaka.github.io/graph-drawing-libraries/examples/almende_vis/02.perf/?n=100)
[vivagraph](http://anvaka.github.io/graph-drawing-libraries/examples/anvaka_VivaGraphJS/02.perf/?n=100)
## Balanced Binary Tree with 4 levels

[dagre](http://anvaka.github.io/graph-drawing-libraries/examples/cpettitt_dagre/02.perf/?graph=balancedBinTree&n=4)
[vis](http://anvaka.github.io/graph-drawing-libraries/examples/almende_vis/02.perf/?graph=balancedBinTree&n=4)
[vivagraph](http://anvaka.github.io/graph-drawing-libraries/examples/anvaka_VivaGraphJS/02.perf/?graph=balancedBinTree&n=4)

Graph settings is passed in the query string. List of arguments:
- `graph` - name of a graph from [generators](https://github.com/anvaka/ngraph.generators) library. Case sensitive. E.g. `ladder`, `circularLadder`. `grid` by default;
- `n` - optional. First argument to a graph generator function. `10` by default;
- `m` - optional. Second argument to a graph generator function (if required). `10` by default;
- `k` - optional. Third argument to a graph generator function (if required). `10` by default;

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the linked performance example at src/src/scripts/examples/cpettitt_dagre/02.perf/index.html and compare its grid and balanced-binary-tree cases with the referenced dagre, vis, and VivaGraphJS examples. Use the query-string graph, n, m, and k settings to reproduce the reported cases; done requires a measurable performance improvement, though the issue does not define a target or implementation scope.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
data-visualization, performance
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.