[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[igraph] python: Graph.add_edges too slow
From: |
Davide Setti |
Subject: |
[igraph] python: Graph.add_edges too slow |
Date: |
Mon, 29 Jun 2009 14:31:02 +0200 |
Hi all,
i'm trying to create a network with python-igraph. While the import
functions (like pajek or dot) are very fast, the creation "from
scratch" of the network is really slow. By profiling my code with the
cProfile module i see the bottleneck is the add_edges function. I
think the problem is the size of the network. You can find a simple
test code here:
http://github.com/vad/network-libraries-test/blob/2d4fff545655d1abb3622dc15478b3df0d607841/igraph-add-edge.py
This takes 17m on my core2duo, while the import of a 130k nodes/400k
edges .dot only takes a few seconds.
I think there should be a solution, because of the fast import
functions. Maybe these functions can disable some checks?
(i'm using a trunk version of 2 weeks ago)
Regards.
--
Davide Setti
blog: http://blog.flatlandia.eu
home: http://www.flatlandia.eu
- [igraph] python: Graph.add_edges too slow,
Davide Setti <=