#1 Can you remove the random call from that code path? #2 Use Cypher with params #3 Send all 100 nodes and rels withing a single tx
#4 Can you run the raw json commands that come out of this without .Net? Am 13.04.2014 um 17:14 schrieb Vasily Kirichenko <[email protected]>: > #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.
