realvirtualController CPU 500ms+
1.realvirtualController CPU 500ms+
private static void PreFixedUpdateCallback()
{
_fixedUpdateFrameCount++;
for (int i = 0; i < _preFixedUpdateHandlers.Count; i++)
{
if (_preFixedUpdateHandlers[i] != null)
{
try
{
_preFixedUpdateHandlers[i].PreFixedUpdate();
}
catch (System.Exception e)
{
//The performance analyzer determined that the `Object.FindFirstObjectByType()` call was taking more than 150ms++, so it was moved inside the catch block to avoid errors on every refresh.
var controllerInstance = Global.realvirtualcontroller ?? Object.FindFirstObjectByType();
Logger.Error($"Error in PreFixedUpdate: {e.Message}", controllerInstance);
}
}
}
}
//! Callback executed after FixedUpdate
private static void PostFixedUpdateCallback()
{
for (int i = 0; i < _postFixedUpdateHandlers.Count; i++)
{
if (_postFixedUpdateHandlers[i] != null)
{
try
{
_postFixedUpdateHandlers[i].PostFixedUpdate();
}
catch (System.Exception e)
{
//The performance analyzer determined that the `Object.FindFirstObjectByType()` call was taking more than 150ms++, so it was moved inside the catch block to avoid errors on every refresh.
var controllerInstance = Global.realvirtualcontroller ?? Object.FindFirstObjectByType();
Logger.Error($"Error in PostFixedUpdate: {e.Message}", controllerInstance);
}
}
}
}
2.The bug in the MQTT code has been fixed in the reply.
MQTT IN/OUTPUT ERROR [Repair] / realvirtual.io Forum / realvirtual.io (formerly game4automation)
Customer support service by UserEcho
FastInterfaceBase.cs Repair
FastInterfaceBase.cs
Hi 陈喜成,
Thank you so much for your excellent and very detailed bug report! Your analysis of the performance issue with
Object.FindFirstObjectByType()was spot on and very helpful for us.We have already updated the code and implemented a fix based on your findings.
We are goint to send you a pre release for testing it on your side via private message.
This fix will also be included in our next official release, which is scheduled to be published very soon.
Thanks again for your great contribution to improving realvirtual.io!
Best regards,
The realvirtual.io Team