Git Product home page Git Product logo

Comments (3)

erossignon avatar erossignon commented on June 5, 2024

node-opcua loads approximately in 300ms on my computer.

If you are only using the client API, you could gain 25% to 30% load time by just using
"node-opcua-client" instead of "node-opcua".
Loading the server and address-space API is unnecessary if you are using the Client API.

Alternatively, you could use a different test framework ( mocha or vitest)

  • node-opcua is using mocha, and we can parallel all test effectively,
  • I am been experiencing with vitest lately and find it amazing.

from node-opcua.

BartaG512 avatar BartaG512 commented on June 5, 2024

Thanks for the tips.
In integration testing I am using both client and server.

I have found a jest runtime which will disable the isolation between test files:

https://www.npmjs.com/package/@m-abboud/hella-fast-jest-runtime

From its description:
The core problem that this is addressing is that jest runs test suites in isolation from each other. So for every test file you have jest has to reload many modules and setup a new test env which can be very slow at least on some projects especially ones using jsdom. Running test suites in isolation is of course helpful because it helps prevent tests interfering with each other which can be a real pain to debug and track down, but I've found that this type of problem is quite rare. The trade off of having way faster tests over these occasional test bugs is way worth it to me and probably other people too.

from node-opcua.

erossignon avatar erossignon commented on June 5, 2024

Thank for the tip. Let's close for now.

from node-opcua.

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.