Thanks, but where I can find CypherFluentQueryCreator type? вторник, 15 апреля 2014 г., 3:52:36 UTC+4 пользователь Kenny Bastani написал: > > I wrote an implementation of Neo4j's HTTP Transactional endpoint. It isn't > integrated into a driver but if you want to try it out, it is here as a > Gist: https://gist.github.com/kbastani/9444652 > > Thanks, > > Kenny > > On Sunday, April 13, 2014 9:31:57 PM UTC-7, Vasily Kirichenko wrote: >> >> 1. I don't think Random has anything with it. CPU time is about 1.7% of >> total time, so it's neo4j / http who took the time. However, I'll remove it. >> >> 2. I used Cypher with params with the exactly same results. >> >> 3. This is what I wanted to do in the first place but have not managed to >> find a .net example or anything in the .net API related to transactions. >> >> воскресенье, 13 апреля 2014 г., 21:02:41 UTC+4 пользователь Michael >> Hunger написал: >>> >>> #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 Systemopen 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.
