neo4j / neo4j-javascript-driver

Neo4j Bolt driver for JavaScript

Home Page:https://neo4j.com/docs/javascript-manual/current/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Lost performance with neo4j-driver 5.2.0 on the browser

camorimd opened this issue · comments

Hello! I'm really sorry because I really don't know how to state the issue so I'll try to give as more detail as possible.

I have a web-project that uses neo4j-driver to connect to a database neo4j database (currently version 4.4.6) and it works flawlessly.
This is the code in question:

 rxSession.run(
            `MATCH (n:${label}) return n order by toLower(n.Nombre)`
        ).records().pipe(
            map( record => record.get('n')),
            concatWith(rxSession.close())
        ).subscribe({
            next: (data) => {
                this[label].items.push(data);
            },
            complete: () => {
                this[label].saving = false;
                this[label].loading = false;
                if(this[label].selected.identity != -1) this.select(label, this[label].items.find(v => v.identity.toInt() == this[label].selected.identity.toInt()));
            },
            error: (error) => this.errors.push(error)
        });

With driver version 4.4.6 and database version 4.4.6 it loads 760 nodes in milliseconds.
Now that I updated the driver to the 5.2.0 version, the same code loads 760 nodes in 5 seconds!

@camorimd, I will investigate the issue.

Thank you very much, I will try to create a sandbox app replicating the issue to see if that helps to diagnose the problem.

Hi @camorimd,

I've found the issue. I will ping here when released.

Fix released in 5.3.0

Great! I will test it and give some feedback!

Solved, thank you very much!