cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Neo4J browser graph render very slow

renatospaka
Graph Voyager

Hi there.

I'm struggling with Neo4j Browser. I have loaded Movies database into an Enterprise Single
Edition 4.0.3 installation on an r4.large EC2 instance.

It is a nice configuration:

2 cores, 16G RAM, 70G HD

And there is only me accessing it.

Even so, it is slow, very slow.. a really poor performance for a single and tiny query: MATCH (people:Person) RETURN people LIMIT 10

It took almost 1m15s to perform. More of this, drag or double clicks, zoom in/out operations take more than 30s to perform. At least.

So I read the log, there is nothing there and I think the problem is the Browser app, although I am not sure.

What can I do to improve this?

Regards,
Renato

1 ACCEPTED SOLUTION

bischrob
Node Link

I've had the same problem the last few weeks using an EC2 instance through Chrome. I tried connecting through the desktop app and everything worked well, and I also tried through the new chromium Edge browser (first time I'd really used it) and it worked really well there as well.

View solution in original post

28 REPLIES 28

deemeetree
Graph Buddy

In general the Neo4J browser is clunky and slow. So I wouldn't rely on it for graph exploration.

Yes, you have a point. However, when I was using a sandbox instance it was normal, an acceptable response for every action I take there. I don't understand why got so slow with a dedicated server.

deemeetree
Graph Buddy

Did you try doing the same query using cypher-shell? I would first compare the speeds on there using the PROFILE prefix to understand whether it's the browser / network problem or if there's an issue with the performance of your database.

renatospaka
Graph Voyager

No, I didn't. I know cypher-shell, this is a great idea but I don't know PROFILE prefix. How does it work? Can you send me a sample?

deemeetree
Graph Buddy

The same thing as a normal query, you just put PROFILE in front, e.g. PROFILE MATCH (n:Node)... and it prints out some extra details as to how many seconds it takes to perform your query, how many db hits it made, etc.

What browser are you using? Chrome? Safari? Edge?

So far I am using Chrome and Opera, mostly the first one

And it is the simple MATCH statement listed above that is causing issues?

deemeetree
Graph Buddy

@mckenzma — It is pretty well-known that Neo4J browser works very badly in all those browsers as soon as you're dealing with anything bigger than a few nodes. I've been watching this since 2013 when I first started using Neo4J and it's amazing that in 7 years it's still as slow as it was back then. I always thought that maybe it's a special trick to let the other companies do the job, so maybe you know which alternatives could be used?

Something seems off. I have Neo4j Browser version 4.0.3 running for a db I work on with billions of nodes and can return a few hundred without issue.

deemeetree
Graph Buddy

@mckenzma that's pretty amazing. maybe the reason is that my datastructure has a lot of connections. so even if the number of the nodes is low, the number of connections is high (that's because each connection is made by a different user in a different context and so that is accounted for). could that be an issue perhaps?

Even with a ton of connections, the length of time your queries takes to run depends on many factors. If you have some code examples, you can paste them and get feedback.

Additionally, depending on the size of your graph, you may want to adjust your memory allocations in the config to increase your ability to read through and return data.

renatospaka
Graph Voyager

Yes, is taking an absurd amount of time to make a drag & drop operation, a double-click operation and for this match takes more than 1m30s to start executing.

That is very atypical in my experience, what kind of connection is there between your computer and that AWS instance? Is there any lag when you try to ping the IP of your instance?

It is a normal connection, bolt or http. I have secured the EC2 instance through security groups, and AMI is one released by David Allen for EC2 environments.

So far I restarted the db server, the EC2 instance, checked all logs and everything looks normal.

Hmm that’s really odd. Can you do a JavaScript performance recording?

Does it also happen when you return properties (n) ?

@michael.hunger, I am a rookie in neo4j, I just put up a server and this was the 1st time I was testing the environment and using Movies dataset.

Please also try cypher-shell

bischrob
Node Link

I've had the same problem the last few weeks using an EC2 instance through Chrome. I tried connecting through the desktop app and everything worked well, and I also tried through the new chromium Edge browser (first time I'd really used it) and it worked really well there as well.

Nice. And now, it is working with Chrome or you are accessing via Edge?

bischrob
Node Link

When I first used chrome it was fine, then I had the problems, but now it's a bit faster. I cleared my cache and cookies and I think it helped a bit. Edge is still faster, but it might be because I typically have numerous chrome tabs up.

@bischrob, just tested now with Edge and it is much, much, much faster. Almost normal. So, for now on I am not going to use Chrome to connect to Neo4j Browser.

bischrob
Node Link

@renatospaka Well at least it works. Now the question is why is there so much of a difference? Anyone have any ideas?

@bischrob, it seems that I will have to regularly clean up the cache.

After two hours accessing via Edge Chromium browser, it began to lower the performance down again. I don't know if it is a reflection of some misconfiguration at server level or just a browser issue.

Anyway, I can work and every now and then, the cache has to be cleaned up. This is an effective workaround.

@renatospaka I'll have to see if mine slows down as well. I mostly access my database via an API, so I may not have noticed the cache issue yet for Edge.

Having to frequently clear the cache is not an effective workaround. This is ridiculous. We should not have to do that to use a piece of software.

Have you tried to disable the "connect result nodes" bit in your browser config?

Usually rendering a few hundred nodes in browser is no big deal.

What I usally do, is to keep the result frames that are there at the same time to a lower number, like 5 or so.

The other thing that could help if you record a performance measurement in the JS console and share it with the browser team, so perhaps that could indicate a root cause?

Thank you, Michael. I have unchecked the "Connect Result Nodes", and I usually never keep more than four or five previous frames active. I close them as quickly as I am no longer actively working with them. I highly recommend that Neo4j make graph display performance in Neo4j browser a priority development focus. I believe performance here affects many people. It makes Neo4j appear to perform poorly even when the issues are not really related to Neo4j itself. I believe there are probably opportunities for improvement here.