Hi,
I am working with a lot of vertex property maps that amongst others need to
be initialized. Here is a simple example:
I am profiling it with:
time python2.7 -m cProfile -o stats test_pmap_speed.py
then draw the callgraph with
gprof2dot -f pstats stats | dot -Tpdf -o output.pdf
Here is an example: output.pdf
<http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/file/n4025725/output.pdf>
There seems to be a constant overhead associated with accessing the property
maps. Fortunately, it appears to be independent of the number of vertices.
It contributes quite significantly to the runtime of my tool. The
initialization is an example, but in general, I also need to copy one map to
another one, e.g. map.a = map1.a, where map1 belongs to the graph Sv, map
belongs to S, and Sv is a GraphView of S.
Alright, after the context, here comes my question: how can I efficiently
(i.e. fast) initialize the maps, copy the maps, etc.? Also, creating a new
map seems to take quite long. I am not working with big graphs, but with a
lot of maps.
I have seen gt.inline, however there is practically no documentation. Could
that be a way to speed this up, and if so, how can I learn about the usage?
Thanks!