Giter VIP home page Giter VIP logo

Comments (6)

bsrdjan avatar bsrdjan commented on August 14, 2024

Are you trying to promisify node-rfc API ? If yes, please check if examples in napi branch README and unit tests fit your needs? You can uninstall node-rfc and run npm install node-rfc@next, to install this napi based prerelease. Please feel free to try, feedback welcome.

from node-rfc.

zig999 avatar zig999 commented on August 14, 2024

I'm not trying to promisify it, its just the way I like to code. =)
My concern is, why it is blocking the event loop like that? The code is correct, it should not block it.

from node-rfc.

bsrdjan avatar bsrdjan commented on August 14, 2024

I tested on Linux with nodejs 8.11.3 and on Windows with nodejs 10.4.1. In either case I could not reproduce performance or blocking issue.

Could you please post the log and how it differs from expected?

Which SAP NW RFC SDK version is used (glClient.getVersion()) ?

Please find the Windows log here:

executeClient: 1.051ms
executeClient: 0.055ms
executeClient: 0.068ms
executeClient: 0.065ms
executeClient: 0.065ms
executeClient: 0.054ms
executeClient: 0.053ms
executeClient: 0.122ms
executeClient: 0.136ms
executeClient: 0.062ms
executeClient: 0.137ms
executeClient: 0.091ms
executeClient: 0.066ms
executeClient: 0.065ms
executeClient: 0.052ms
executeClient: 0.037ms
executeClient: 0.061ms
executeClient: 0.061ms
executeClient: 0.077ms
executeClient: 0.084ms
executeClient: 0.116ms
executeClient: 0.056ms
executeClient: 0.041ms
executeClient: 0.097ms
executeClient: 0.045ms
executeClient: 0.076ms
executeClient: 0.043ms
executeClient: 0.130ms
executeClient: 0.067ms
executeClient: 0.128ms
executeClient: 0.128ms
executeClient: 0.092ms
executeClient: 0.090ms
executeClient: 0.096ms
executeClient: 0.090ms
executeClient: 0.080ms
executeClient: 0.050ms
executeClient: 0.158ms
executeClient: 0.071ms
executeClient: 0.044ms
executeClient: 0.093ms
executeClient: 0.056ms
executeClient: 0.175ms
executeClient: 0.056ms
executeClient: 0.118ms
executeClient: 0.038ms
executeClient: 0.055ms
executeClient: 0.032ms
executeClient: 0.086ms
executeClient: 0.044ms
executeClient: 0.099ms
executeClient: 0.047ms
executeClient: 0.042ms
executeClient: 0.108ms
executeClient: 0.047ms
executeClient: 0.027ms
executeClient: 0.120ms
executeClient: 0.048ms
executeClient: 0.088ms
executeClient: 0.056ms
executeClient: 0.073ms
executeClient: 0.046ms
executeClient: 0.092ms
executeClient: 0.040ms
executeClient: 0.052ms
executeClient: 0.132ms
executeClient: 0.066ms
executeClient: 0.054ms
executeClient: 0.058ms
executeClient: 0.045ms
executeClient: 0.084ms
executeClient: 0.030ms
executeClient: 0.033ms
executeClient: 0.059ms
executeClient: 0.148ms
executeClient: 0.075ms
executeClient: 0.049ms
executeClient: 0.032ms
executeClient: 0.044ms
executeClient: 0.031ms
executeClient: 0.029ms
executeClient: 0.079ms
executeClient: 0.041ms
executeClient: 0.091ms
executeClient: 0.049ms
executeClient: 0.038ms
executeClient: 0.088ms
executeClient: 0.045ms
executeClient: 0.033ms
executeClient: 0.043ms
executeClient: 0.062ms
executeClient: 0.089ms
executeClient: 0.047ms
executeClient: 0.048ms
executeClient: 0.036ms
executeClient: 0.073ms
executeClient: 0.105ms
executeClient: 0.043ms
executeClient: 0.046ms
executeClient: 0.037ms

from node-rfc.

zig999 avatar zig999 commented on August 14, 2024

Thanks for the response!
That's strange. I'm running on Windows, updated to node 8.11.3.
SAP NW RFC SDK is { major: 7500, minor: 0, patchLevel: 1 }.
"node-rfc": "^0.1.16"

The results:

executeClient: 83.359ms
executeClient: 5001.281ms
executeClient: 4999.365ms
executeClient: 5000.776ms
executeClient: 5000.485ms
executeClient: 5000.605ms
executeClient: 5000.756ms
executeClient: 4999.922ms
executeClient: 5001.896ms
executeClient: 5000.368ms
executeClient: 5000.196ms
executeClient: 5000.124ms
executeClient: 5001.024ms
executeClient: 5000.983ms
executeClient: 5000.690ms
executeClient: 5000.107ms
executeClient: 5000.821ms
executeClient: 4999.915ms
executeClient: 5000.077ms
executeClient: 5000.376ms
executeClient: 4999.794ms

from node-rfc.

bsrdjan avatar bsrdjan commented on August 14, 2024

Hi @zig999,

I tested again and it works just as you described, on Linux and on Windows. The reason I did not reproduce at first is that I tested with pre-release, in which this issue apparently does not occur.

Briefly comparing prerelease (@next) and 0.1.16 sources I didn't find anything suspicious and need to investigate further.

Would you mind using prerelease version for the time being ?

On Windows you may experience an annoying issue during installation, described in node-pre-gyp issue 367.

As a workaround:

  1. Download and unpack sapnwrfc.node from 0.20.0-rc2/rfc-node-v57-win32-x64.tar.gz

  2. Force node-rfc@next install

npm install node-rfc@next --save --force
  1. Copy sapnwrfc.node to node_modules\node-rfc\lib\binding\node-v57-win32-x64

In this prerelease please also change:

var rfc = require('node-rfc');

var glClient = new rfc.Client({
	"user": "XXX",
	"passwd": "XXX",
});

to:

var rfcClient = require('node-rfc');

var glClient = new rfcClient({
	"user": "XXX",
	"passwd": "XXX",
});

Hope this helps,
Srdjan

from node-rfc.

zig999 avatar zig999 commented on August 14, 2024

Thanks @bsrdjan , glad to hear it is fixed on the next version. =)
I'll give it a try.

from node-rfc.

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.