-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathperformance.Rmd
More file actions
30 lines (22 loc) · 1.08 KB
/
performance.Rmd
File metadata and controls
30 lines (22 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
---
pagetitle: Performance
---
```{r, eval=TRUE, echo = FALSE}
require("visNetwork", quietly = TRUE)
```
### With default/some options, render network can take a long time. Here are some ways to improve the performance :
* By default, and if we don't pass any information about coordinates, [vis.js](http://visjs.org/) computes coordinates dynamically and waits for stabilization before rendering. You can disable or control stabilization using ``visPhysics`` :
```{r, eval = FALSE}
visNetwork(nodes, edges) %>%
visPhysics(stabilization = FALSE)
```
* Another tip is to disable smooth curve for edges. It's better for performance :
```{r, eval = FALSE}
visNetwork(nodes, edges) %>%
visEdges(smooth = FALSE)
```
* Since __visNetwork_0.2.1__, it's possible to make the link between the features of package [igraph](http://igraph.org/r/) and those of __visNetwork__. The best way to decrease plotting time is actually to use [igraph](http://igraph.org/r/) layout to compute coordinates before with ``visIgraphLayout()`` :
```{r, eval = FALSE}
visNetwork(nodes, edges) %>%
visIgraphLayout()
```