igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] speed slowdown with version change


From: Cowan, R (MERIT)
Subject: Re: [igraph] speed slowdown with version change
Date: Fri, 14 Dec 2018 16:59:35 +0000

I found the source: it is in the new structures that igraph returns.
inserting the statement

igraph_options(return.vs.es = FALSE)

after loading the igraph library returns the speeds to “normal”.


On 14 Dec 2018, at 17:49, Cowan, R (MERIT) <address@hidden> wrote:

Attached is the simulation script.
In it there is a block of code that uses igraph to create two networks and then calculate neighbourhoods of the networks.
To test the effects of igraph there is a block of code immediately following that creates a list of artificial neighbourhoods.

The version with the igraph networks seems to take about 70 times as long to run as the version with the artificial networks.

Thanks for your help.
Robin Cowan
PS. I also attach the output of Rprof() for the two versions. When I did it I thought the issue was R so they are labelled Rprof-3-1-3 (which uses igraph 0.7) and Rprof-3-5-1 (which uses igraph 1.x)


<simulationR-R.txt><Rprof-3-1-3.txt><Rprof-3-5-1.txt>

On 14 Dec 2018, at 15:20, Gábor Csárdi <address@hidden> wrote:

Well, you'll have to show the code you are running.  Gabor
On Fri, Dec 14, 2018 at 2:18 PM Robin Cowan
<address@hidden> wrote:

I have a small simulation that creates a network of agents who then play a game on the network.
I noticed that when I run the simulation under R 3.1.3 igraph 0.7.1 it takes about 4 seconds.
When I run it using R 3.5.1 with igraph 1.2.2 it takes about 4 minutes.

I use igraph to create a network and then extract neighbourhoods. The neighbourhoods are what is actually used  to get the nodes to play the game.
I re-wrote it to remove igraph from the code — to test whether igraph is the issue, I created a list directly which represented the neighbourhoods.
With that elimination of igraph (and no other changes) it takes about 4 seconds under R 3.5.1
Some of the maintainers on the R list looked and came tot he same conclusion. The problem is with igraph changes between 0,7 and 1.2.
Has this come to light before?

Thanks,
Robin Cowan



_______________________________________________
igraph-help mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help

_______________________________________________
igraph-help mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help

_______________________________________________
igraph-help mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help


reply via email to

[Prev in Thread] Current Thread [Next in Thread]