I create separate trees, but each next tree is loaded slower

The JSON is loaded.
For each new tree, I create individual Labels and relations.
But each next tree is loaded slower than previous.
Example:
The first tree is loaded for 1 minute.
The second tree is loaded for 2 minutes.
....
Why?
If I create each time separate tree (labels and relations too), I will see approximately the same time of loading.
Where I could read how the database works under the hood in this case?

Could you please give more details about the data?

Yes.
I receive a big JSON and need to create nodes and relations between them.
For each JSON, I create an individual tree.

What do you mean by saying individual tree?
Is that all the json files have same architecture?
Are you creating different labels with each input file?
It will be good you provide some highlevel architecture of your load?

@intouch.vivek

Trees don't have relations with each other.

Yes

Yes and indexes too.

Yes, little later.

@intouch.vivek


And I will save ten trees

Example of tree

I do not see much any such problem until I do not see the data what you are trying to insert, specially the volume. However I had faced the same issue and one of the primary reason are as below:

  1. If you are loading the data via java/python or any other script then make sure you open and close the Neo4j connection properly, do not release the connection until you are done.
  2. Second the the memory allocated to the heap memory. Memory allocated to Neo4j is the biggest issue.