Permalink
Browse files

Do not update created relationships - avoids lots of gets

  • Loading branch information...
1 parent d99e0bd commit f647efb154aa0f09406aedd360926390087f67b4 @panisson panisson committed May 18, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 load_gexf_to_neo4j.py
View
@@ -217,24 +217,24 @@ def add_to_timeline(root_node, node, timestamp):
edge.relationships.create("EDGE_TAG", tag2)
RUN.relationships.create("RUN_EDGE", edge)
-tx = gdb.transaction()
+tx = gdb.transaction(update=False)
print 'Adding %s tags to frames'%len(frame_tags)
for i, (frame, tag) in enumerate(frame_tags):
if i%1000 == 0:
sys.stdout.write('.')
sys.stdout.flush()
tx.commit()
- tx = gdb.transaction()
+ tx = gdb.transaction(update=False)
frame.relationships.create("FRAME_TAG", TAG_DICT[tag_id])
tx.commit()
-tx = gdb.transaction()
+tx = gdb.transaction(update=False)
print 'Adding %s edges to frames'%len(frame_edges)
for i, (frame, edge) in enumerate(frame_edges):
if i%1000 == 0:
sys.stdout.write('.')
sys.stdout.flush()
tx.commit()
- tx = gdb.transaction()
+ tx = gdb.transaction(update=False)
frame.relationships.create("FRAME_EDGE", EDGE_DICT[(id1,id2)], weight=1)
tx.commit()

0 comments on commit f647efb

Please sign in to comment.