I have some old graph data with 1 million nodes and 3 million edges that I'd like to convert into Neo4j.
I'm using Neo4j embedded and my program is roughly like:
for (all node in old graph data):
node1 = neo4jdb.findNode(node1_id)
node2 = neo4jdb.findNote(node2_id)
if (node1 or node2 doesnt exist):
create new nodes
if (! relationExistBetween(node1, node2)):
create new relation between node1 and node2
However, the creation process is super slow. With the exact same logic, the program runs much faster with TinkerGraph.
I'm wondering if there're any tricks to make this faster? Thanks!