-
Notifications
You must be signed in to change notification settings - Fork 27.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Slow operations over NAPI #138467
Comments
Looks like 1.56 was when Electron 12 landed. https://code.visualstudio.com/updates/v1_56#_electron-12-update |
This would be a side-effect of electron/electron#28957 that requires nodejs/node@7abc7e4. Can you check if the issue is present with exploration builds based on newer runtime #137241 that contains the above fixes. |
I tried the exploration build but it still has the same behavior. This can be reproduced by installing Haxe extension as well as Hashlink debugger, then creating a new project with these files : Put a breakpoint on Main.hx line 37 and compile & run. When the debugger breaks, try to display the content of |
@deepak1556 I think I have provided all the info required, any further insight ? |
The issue has been reproduced and we found this is due to the new array buffer backing storage query in v8. |
Hi !
I'm the main developer of the Hashlink Debugger (https://github.com/vshaxe/hashlink-debugger)
We have noticed after upgrading from VSCode 1.55 to 1.56 that there was an important slowdown of the debugger.
I now took time to investigate it further, and found that the issue was related to a single call being made through ffi-napi to read the process memory (on windows ReadProcessMemory - https://github.com/vshaxe/hashlink-debugger/blob/master/hld/NodeDebugApi.hx#L46). Every call now takes tens to hundreds of milliseconds to complete which was not the case in VSCode 1.55
I thought first it was a performance regression in libffi so I upgraded to use another ffi library which claims superior speed (sbffi : https://github.com/bengl/sbffi), but the results are again good on 1.55 but very slow on latest 1.62.3, which leads me to think there is something in either VSCode or Electron that has been changed regarding NAPI implementation which makes ffi usage a magnitude slower than it used to be, making the debugger not very usable anymore.
Any insight to solve this quite technical issue would be greatly appreciated.
The text was updated successfully, but these errors were encountered: