there seems to be an issue with the foreach but the node creation with parameters seems to be pretty fast
@Test
public void testCreateNodePerformance2() throws Exception {
Map params=new HashMap(COUNT);
StringBuilder query=new StringBuilder("create ");
for (int i=0;i<COUNT;i++) {
params.put("_" + i, map("id", i));
query.append(" n = {_"+i+"} ");
if (i<COUNT-1) query.append(", ");
}
final ExecutionEngine executionEngine = new ExecutionEngine(gdb);
// warmup
final ExecutionResult result = executionEngine.execute(query.toString(), params);
long time=System.currentTimeMillis();
executionEngine.execute(query.toString(), params);
System.out.println(result);
System.out.println("Creating "+COUNT+" nodes took "+(System.currentTimeMillis()-time)+" ms.");
}