What is the setup of your server? I think Neo4jClient supports batching and also the transactional endpoint.
But even without batching performance should be much much higher. Cheers, Michael Am 14.04.2014 um 02:53 schrieb Phil coppney <[email protected]>: > These results are similar to what I am seeing with the .net client > > This code > > if (p != null) > { > client.Cypher > .Create("(person:Person {newPerson})") > .WithParam("newPerson", p) > .ExecuteWithoutResults(); > } > _CurrentNode += 1; > > > will insert just under 8 nodes per second. Is there way to import a batch of > records at once with the client? > > > > > > > On Sunday, April 13, 2014 10:14:42 AM UTC-5, Vasily Kirichenko wrote: > #r @"..\packages\Neo4jClient.1.0.0.651\lib\net40\Neo4jClient.dll" > #r @"..\packages\Newtonsoft.Json.5.0.1\lib\net45\Newtonsoft.Json.dll" > > open System > open Neo4jClient > > let client = GraphClient(Uri "http://localhost:7474/db/data") > client.Connect() > > [<CLIMutable>] > type Person = { Name: string; Age: int } > > type PersonRelationship (targetNode) = > inherit Relationship (targetNode) > override x.RelationshipTypeKey = "FRIEND" > interface IRelationshipAllowingSourceNode<Person> > interface IRelationshipAllowingTargetNode<Person> > > let generatePeople n = > let rnd = Random() > seq { 1..n } > |> Seq.map (fun i -> { Name = sprintf "person%d" i; Age = rnd.Next(20, > 40) }) > |> Seq.map client.Create > |> Seq.pairwise > |> Seq.iter (fun (x, y) -> client.CreateRelationship(x, > PersonRelationship(y)) |> ignore) > > generatePeople 100 > > It executes about 11 seconds: Real: 00:00:11.735, CPU: 00:00:00.202, GC gen0: > 3, gen1: 0, gen2: 0 > Which means the performance is about 8.5 nodes / relations per second. It's > totally awful. > > Is it OK or I'm doing something wrong? > > Regards. > > -- > You received this message because you are subscribed to the Google Groups > "Neo4j" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Neo4j" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
