Dashboard 疑似由意外“特性”引发的性能问题 #258
Closed
StardustSeemsInk
started this conversation in
Bugs
Replies: 2 comments 1 reply
-
待 @Dynesshely 确认为 Bug 后创建 issuse 解决 |
Beta Was this translation helpful? Give feedback.
0 replies
-
经过初步检查, 初步判定并不是代码编写逻辑的问题, 而是 /// <summary>
/// 接收客户端
/// </summary>
private static void AcceptClient()
{
var location = $"{nameof(DevicesServer)}.{nameof(AcceptClient)}";
try
{
while (keepListen && listener is not null)
{
if (listener.Pending()) // <- HERE
{
var client = listener.AcceptTcpClient();
if (client.Client.RemoteEndPoint is not IPEndPoint endpoint) continue;
clients.Add(endpoint.ToString(), client);
Log.Information($"New device connection: {endpoint}");
ReceiveMessage(client);
}
}
}
catch (Exception ex)
{
Log.Error(ex, $"In {nameof(location)}: {ex.Message}");
Status = ServerStatus.Errored;
}
} /// <summary>
/// 接收客户端
/// </summary>
private null void AcceptClient()
{
var location = $"{nameof(PluginsServer)}.{nameof(AcceptClient)}";
try
{
while (keepListen && listener is not null)
{
if (listener.Pending()) // <- HERE
{
var client = listener.AcceptTcpClient();
if (client.Client.RemoteEndPoint is not IPEndPoint endpoint) continue;
clients.Add(endpoint.ToString(), client);
Log.Information($"New plugin connection: {endpoint}");
ReceiveMessage(client);
}
}
}
catch (Exception ex)
{
Log.Error(ex, $"In {location}: {ex.Message}");
Status = ServerStatus.Errored;
}
} 占用情况如图. 基本上占用一半的资源, 另一半则是 sockets 库
这里请求 @Dynesshely 确认 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
如图为关闭 KitX dashboard 前后CPU的占用率()
好像就五一之后的版本……突然占用变高
老版本挂后台基本没感知的嘞()
现在一起动 dashboard 电脑风扇就啸叫
……是不是有逻辑死循环了(?)
Beta Was this translation helpful? Give feedback.
All reactions