Closed DarioS closed 1 year ago
This issue is now solved, although I don't know which specific change we've made in the past solved this. I remember there were performance problems with creating igraph vertex sequence objects.
This is what I get on my machine now:
> system.time(interactors <- as_adj_list(aGraph))
user system elapsed
1.316 0.008 1.324
I have a simulated two-column edge matrix with 100000 rows. It's intended to be representative of the Human Reference Interactome in its size. The task I'm attempting to do is find all of the interactors of vertices with a degree above a threshold (e.g. at least 5 vertices).
Calculating the degree of each vertex is fast.
However,
as_adj_list
takes a long time.I wrote a function that does the same task which takes 2.5 seconds.
Are there performance optimisations which could be made to
as_adj_list
? Also, the function returns "a list of numeric vectors" whereas some other functions, such asgroups
returns "A named list of numeric or character vectors". Could they have a consistent return type?