igraph-help
[Top][All Lists]
Advanced

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

[igraph] g.es.find() Bottleneck


From: Jack Zellweger
Subject: [igraph] g.es.find() Bottleneck
Date: Thu, 14 Jul 2016 14:57:13 -0400

Hello all,

The Problem: 
I am having trouble with program execution speed on a Python implementation of igraph. I import a complete weighted graph of 4268 nodes, and 9105778 edges into a variable g. My program executes quickly and efficiently, but get stopped up when the function g.es.find() is executed. 

Code Snippet:
Here's an example of the bottleneck...

source = g.vs.find(name='1234')

target = g.vs.find(name='3456')

# This function call takes ~2 seconds

neighborEdge = g.es.find(_source=source.index, _target=target.index)


This last line of code alone takes about 2 seconds, where as all the other lines of code execute in an instant.

The Question:
Is there a faster way identify and set an edge between two nodes equal to the variable neighborEdge? This implementation takes too long with this huge graph I'm handling. Any help is greatly appreciated. Thanks so much for your time.

Best,
Jack Zellweger
LIGO Research
Kenyon College

reply via email to

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