Coder Social home page Coder Social logo

Comments (4)

bigmontz avatar bigmontz commented on June 12, 2024

Thanks for the report @ztratar, which driver and node versions are you using?

from neo4j-javascript-driver.

bigmontz avatar bigmontz commented on June 12, 2024

I don't have issue with my simple esbuild setup here:

package.json

{
  "name": "gh1168",
  "version": "1.0.0",
  "main": "index.js",
  "license": "MIT",
  "devDependencies": {
    "esbuild": "^0.19.11"
  },
  "dependencies": {
    "neo4j-driver": "^5.16.0"
  },
  "scripts": {
    "build": "esbuild index.js --bundle --platform=node --sourcemap --outfile=bin/out.js"
  }
}

index.js

const neo4j = require('neo4j-driver')


const driver = neo4j.driver('neo4j://localhost:7687', neo4j.auth.basic('neo4j', 'password'))


performance.measure('Start to Now');
performance.mark('Before Query');

driver.executeQuery('RETURN 1', {}, {
    database: 'neo4j'
}).then(() => {
    performance.mark('After Query')
    
    const measure = performance.measure('Query Time', 'Before Query', 'After Query');

    console.log('Query took', measure.duration)
}).finally(() => driver.close())

Command line:

yarn build && node bin/out.js

from neo4j-javascript-driver.

ztratar avatar ztratar commented on June 12, 2024

Hello! This was happening on 16.19.

We've now upgraded to node 20 LTS, and, oddly enough, it appears the query times have all improved to normal with that change.

from neo4j-javascript-driver.

bigmontz avatar bigmontz commented on June 12, 2024

I've tried my sample with project with node v16.19.0 and I can't reproduce the problem.
I can't figure out what's happening. Can you reproduce the problem with the setup I shared?

Thanks

from neo4j-javascript-driver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.