Skip to content
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

networkInterfaces接口在windows下耗时比较长,需要优化 #953

Open
HITchaos opened this issue Dec 12, 2024 · 4 comments
Open

networkInterfaces接口在windows下耗时比较长,需要优化 #953

HITchaos opened this issue Dec 12, 2024 · 4 comments

Comments

@HITchaos
Copy link

主要的问题发生在network.js中,getWindowsIEEE8021x内的两条命令:
i8021xState = execSync(netsh wlan show profiles "${ifaceSanitized}" | findstr "802.1X", util.execOptsWin);
i8021xProtocol = execSync(netsh wlan show profiles "${ifaceSanitized}" | findstr "EAP", util.execOptsWin);

我的程序是GUI应用,当用户触发搜索可用网络时,getWindowsIEEE8021x处在一个循环中,调用的总次数接近10次,耗时3~5秒左右,UI会卡顿

后续我会开辟新的子进程来处理这个接口相关的功能,还是希望制作组考虑下windows下如何优化这个部分,至少不要让netsh wlan show profiles命令太多次的执行

@HITchaos
Copy link
Author

我使用的版本是5.23.8

@sebhildebrandt
Copy link
Owner

@HITchaos please provide all information in English!

@HITchaos
Copy link
Author

The main issue occurs in network.js, with two commands in getWindows IEEE8021x:
i8021xState = execSync(netsh wlan show profiles "${ifaceSanitized}" | findstr "802.1X", util.execOptsWin);
i8021xProtocol = execSync(netsh wlan show profiles "${ifaceSanitized}" | findstr "EAP", util.execOptsWin);
My program is a GUI application. When the user triggers to search the available network, getWindowsIEEE8021x is in a cycle, and the total number of calls is close to 10, which takes about 3-5 seconds, and the UI will get stuck
I will create new sub processes to handle the interface related functions in the future. I hope the production team can consider how to optimize this part under Windows, at least not to make the Netsh WLAN show profiles command execute too many times

@sebhildebrandt
Copy link
Owner

sebhildebrandt commented Dec 12, 2024

@HITchaos Ok, thank you ... will have a look at it how I can improve this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants