# Neo4j result Graph moves slow- Performance issue

**URL:** <https://community.neo4j.com/t/neo4j-result-graph-moves-slow-performance-issue/4530>\
**Category:** Browser\
**Tags:** performance\
**Created:** [January 22, 2019, 10:47am UTC](https://community.neo4j.com/t/neo4j-result-graph-moves-slow-performance-issue/4530 "2019-01-22T10:47:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![groverjatin17](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/groverjatin17/32/2174_2.png) [@groverjatin17](https://community.neo4j.com/u/groverjatin17)\
**Post date:** [January 22, 2019, 10:47am UTC](https://community.neo4j.com/t/neo4j-result-graph-moves-slow-performance-issue/4530/1 "2019-01-22T10:47:35Z")

</div>

Hi All,

The overall issue is performance. At first when I ram the CYPHER query the result used to show all the Nodes but **NO** Relationships.

Then I changed the "Initial Node Display" to 2000 from 300 in settings.

Now same query returns 643 nodes and 7443 relationships between 4 different labels of pattern.  
This is what I wanted but the only problem is that the graph is very slow. If I try to drag any node or even zoom out, the graph moves after few seconds and sometimes hangs for 5 seconds and then moves.

**_1. Is this related to OS Browser?_**  
**_2. Can I improve the performace by changing something in the CYPHER Query?_**  
**_3. Do I need to change something in the Configuration file like Heap Memory so that the Nodes and Relationships should move around faster?_**

Please find all the additional details below.

Windows Browser: Chrome  
Neo4j Browser version: 3.2.10  
Neo4j Server version: [3.4.9]

APOC libraries involved

- apoc.create.vNode
- apoc.create.vRelationship
- apoc.map.groupBy

Below here is the Cypher query I am using.  
In this I am collecting/grouping the nodes with some similar properties and their relationships and then creating virtual nodes our of those.  
I am not sure if the query is the issue here because I have used another query as well that returns tons of data. Its just that tha data is a huge. (100s and 1000s of nodes and relationships)

```auto
MATCH (se:XXLSenderEntity)-[:COUNTERPARTY]->(cp:XXLCounterParty)-[:CUSTODIAN]->(re:XXLReceivingEntity),
(cp:XXLCounterParty)-[:REPAIR_REASON]-(err:XXLRepairReason)
WITH se.senderEntity as sender, cp.counterparty as counter, re.receivingEntity as receiver,err.errorDesc as error, count(*) as count
WITH collect(distinct sender) as senders, collect(distinct counter) as counters, collect(distinct receiver) as receivers,collect(distinct error) as errors, collect([sender, counter, receiver, error,count]) as rels
WITH apoc.map.groupBy([seName IN senders | apoc.create.vNode(['XXLSenderEntity'],{name:seName})], 'name') as senders, 
apoc.map.groupBy([cpName IN counters | apoc.create.vNode(['XXLCounterParty'],{name:cpName})], 'name') as counters,
apoc.map.groupBy([reName IN receivers | apoc.create.vNode(['XXLReceivingEntity'],{name:reName})], 'name') as receivers,
apoc.map.groupBy([errName IN errors | apoc.create.vNode(['XXLRepairReason'],{name:errName})], 'name') as errors, rels
UNWIND rels as rel
RETURN senders[rel[0]], counters[rel[1]], apoc.create.vRelationship(senders[rel[0]], 'ALL_COUNTERPARTY', {count:rel[4]}, counters[rel[1]]) as rel, receivers[rel[2]],
apoc.create.vRelationship(counters[rel[1]], 'ALL_RECEIVERS', {count:rel[4]}, receivers[rel[2]]) as rel1, errors[rel[3]],
apoc.create.vRelationship(counters[rel[1]], 'ALL_ERRORS', {count:rel[4]}, errors[rel[3]]) as rel2

```

---

<div class="post-metadata">

**Author:** ![michael.hunger](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/michael.hunger/32/27377_2.png) [@michael.hunger](https://community.neo4j.com/u/michael.hunger)\
**Post date:** [January 24, 2019, 2:36am UTC](https://community.neo4j.com/t/neo4j-result-graph-moves-slow-performance-issue/4530/2 "2019-01-24T02:36:46Z")

</div>

The Neo4j browser is not suited for displaying huge amounts of nodes and relationships, there are many libraries out there that are more suited for that. See our series here.

> **[Data Visualization – Neo4j Developer Blog – Medium](https://medium.com/neo4j/tagged/data-visualization)**
>
> Read writing about Data Visualization in Neo4j Developer Blog. Developer Content around Graph Databases, Neo4j, Cypher, Data Science, Graph Analytics, GraphQL and more.
