neo4j-contrib / neovis.js

Neo4j + vis.js = neovis.js. Graph visualizations in the browser with data from Neo4j.
Apache License 2.0
1.59k stars 324 forks source link

It's slow when i changed cypher #299

Closed royhuang813 closed 1 year ago

royhuang813 commented 1 year ago

Hi, there's a simple demo for this question: demo

just set your config~

   neo4j: {
                serverUrl: "bolt://localhost:7687",  // your local server
                serverUser: "neo4j",  // your user
                serverPassword: "qwer1234",  // your password
            },

as you see, it spent about 2s when click update 250, in my actual project this would cost more

Is there any optimization plan? thank you ~

royhuang813 commented 1 year ago

image

oh~ the promise spend long time, it's sync over all

thebestnom commented 1 year ago

Yep 😅 can change it to configurable sync or not, but most likely what slows the sync is the cypher configs

royhuang813 commented 1 year ago

btw, I found that the cause of the slowdown was more because of vis.js itself, like vis.js basic demo

I will keep to find the optimization scheme of vis.js, of course maybe vis.js is not good at handling large amounts of data as d3~

thanks again~

thebestnom commented 1 year ago

Yep, d3 is much faster, but it way less intuitive, and neovis started as a way to quickly set it up and customize for your website as quickly as possible, maybe one day Ill create a fork with d3 or somthing that uses wengpu or somthing