Am 16.03.20 um 11:48 schrieb ioana:
> Hi, 
> I am computing a weight for each edge, in a graph of some million nodes and
> about 50 mil edges. Initially, it was doing 25000 edges per minute, so it
> should have finished processing in about 30+ hours. Now I check the server
> for results after more than 72 hours, and the process is still running, but
> very slowly, doing less than 1000 edges per minute. 
> Is there anything I am doing wrong, or what could be the reason for such a
> slowdown?

It's hard to get to the bottom of things, since you are not even trying
to explaining what you wan to do. But looking very briefly at your code,
I can see the following problems:

   You should not do a property map lookup inside the deeper loop, it's
   better to look it up outside and keep it around:

      elabel = g.edge_properties["label_id"]

   Avoid looking up edge descriptors like this:

      g.edge(edge[0], edge[1])

   This takes time O(k) where k is the degree of an endpoint. Since you
   are using array-based iteration, you should put the property map you
   want in the first call to g.get_edges().

These are just some things that pop out, but it might be that there is
an altogether better way to achieve whatever it is you want do.

Best,
Tiago

-- 
Tiago de Paula Peixoto <ti...@skewed.de>

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
graph-tool mailing list
graph-tool@skewed.de
https://lists.skewed.de/mailman/listinfo/graph-tool

Reply via email to