Hard impact on performance

Posts: 46
Hello,

I just got two "litte" questions.
I'm cycling the cameras of our stream via ATVO with the help of timers. I'm doing the same with the standings to fade them in and out. So there are running 2 timers the whole time on our streaming PC.
After a few hours (theme remains running smoothly), the atvo input interface (control panel/timingscreen etc...) becomes very laggy and slow. It even makes iracing stuttering a bit when you push a button.
Can this be caused by the timers running the whole time?
In the control panel of Windows everything looked fine. (Normal usage while streaming)
Ab about 1.7 Gb Ram was used by atvo.
Restart atvo solves the problem, and everything runs smooth again.
I don't use NDI.

Another question is, at the Bathurst 12h (no multiclass) atvo showed the wrong postion of our car (ticker and standings)
The whole there were 7 teams missing. So at the beginning we were at pos 32,but atvo showed 25.
In todays stream everything works fine (ielms 3 classes) , there are no problems with the same the.
I've used the "liveposition" dataset in the ticker an the standings.

Maybe somebody of you already encountered a problem like that :)

MfG
Christian
Posts: 785
Can you upload the theme with the timers for me to try? I will look into it. 1.7GB sounds high but I'm not sure, is it that high immediately after restarting as well?

For the wrong position, are you sure you have all cars visible in the iracing settings, or at least as many as there are entries? You must enable all cars (60) otherwise iracing doesn't send you data for all cars.
Edited (1 time)
Posts: 46
Hey Nick,



Yes I've enabled to display 60 cars in iRacing, so that should not be the problem.
The problem with the standings occured only on the Bathurst 12h, next time on a iLms endurance session everythin was fine.

Thx for your help Nick!
Edited (1 time)
Posts: 785
So far I have not seen any issue with the timers. But I do notice that the theme itself is super slow because of two issues in your scripts:

1. TeamOrDriver script does not do a proper null check. If you had looked in the Event Log you could have seen a ton of errors, and the script is basically running non-stop as fast as it can but failing every time. A simple null-check prevents the continuous exceptions and makes the theme run smoothly for me.

2. Pit script sometimes receives a string value instead of a IEntitySessionResult value. Probably you used a wrong binding somewhere. I added a simple check to stop if the value type is incorrect.

using System;
using ATVO.ThemesSDK;
using ATVO.ThemeEditor.ThemeModels;
using ATVO.ThemeEditor.Scripting.DotNET;
using ATVO.ThemesSDK.Data.Results;

namespace Scripts
{
public class TeamOrDriver : IScript
{
public object Execute(ThemeContentItem item, object value, string parameter, ISimulation sim)
{
IEntitySessionResult result = (IEntitySessionResult) value;

// Nick: added check if result or result.Entity is null
if (result?.Entity == null)
return "";

string team = result.Entity.Name;

if (team[0] == '\0')
{
return result.Entity.CurrentDriver;
}
else
{
return result.Entity.Name;
}


//if (result.Entity.Name = 0)
// return result.Entity.CurrentDriver;
//else
// return result.Entity.Name;

}
}
}


using System; 
using ATVO.ThemesSDK;
using ATVO.ThemesSDK.Data.Entity;
using ATVO.ThemeEditor.ThemeModels;
using ATVO.ThemeEditor.Controls;
using ATVO.ThemeEditor.Scripting.DotNET;
using ATVO.ThemesSDK.Data.Enums;
using ATVO.ThemesSDK.Data.Results;
namespace Scripts
{
public class Script : IScript
{
public object Execute(ThemeContentItem item, object value, string parameter, ISimulation sim)
{
// Bind to "entitysessionresult_obj" to get the IEntitySessionResult as the value

// Nick: Check type of value and cast
if (!(value is IEntitySessionResult))
{
Console.WriteLine("Pit script was bound to wrong type: " + value.GetType());
return null;
}

var result = (IEntitySessionResult)value;


// Check DNS, Out, Pits, etc
if (result == null)
return "";

if (result.DidNotStart)
return "DNS";

if (result.Out)
return "OUT";

if (result.Entity?.Car?.Movement?.IsInPits == true)
return "IN PITS";

if (result.Finished)
return "FIN";

// If none of these are true, then show the gap

// We need the following information to determine whether to show gap or laps
var pos = result.LivePosition;
var gap = result.LiveGap;
var laps = result.LiveGapLaps;
var type = result.Session.Type;

// Optional: there is no gap for P1 so show nothing
if (pos == 1)
return "Leader";

// If car is lapped AND this is a race session,
// then show nr of gap laps instead of gap time
if (laps > 0 && type == SessionType.Race)
{
if (laps == 1)
return "1 Lap"; // to avoid incorrect "1 Laps"
else
return laps + " Laps";
}

// If the car is in the same lap just return the time
return gap.ToString("0.0");
}
}
}
Posts: 46
Hmm ok, I'll check that (sorry not a pro in C) and make it run for several hours.
When I have some results, I'll keep you updated here in the thread.

Thx Nick :)
Posts: 46
Hey Nick,

It's look like the scripts made my theme slow down with the time. Tried it now once on a VRS Endurance session, an the theme worked for 3 hours like a charm.

Btw, is there a function to change the followed driver by taping a button on the atvo control panel? (like the next car hotkey "V" in iracing)
Posts: 785
Yes, there is an action for ChangeCamera. You can choose to change the camera group, or the focus of the camera (e.g. which driver you're following). To change focus to another driver select the 'Change Focus' effect. Then, in the Value you can put a number of different things which are unfortunately not very well documented yet. If you put a random character in that field, the warning will tell you what is expected. You can choose from:
  • Position number, e.g. "2" or "P2"
  • Car number with pound sign: "#12"
  • Customer ID: 12345
  • Relative change from the current car to the Nth next / prev car on track: "relative_track(N)" where N is the number of cars on track to go forward or back.
    • relative_track(1): move forward to next car on track
    • relative_track(-3): move backward 3 cars on track
  • Relative change from the current car to the Nth next / prev position: "relative_pos(N)". Similar to relative_track, but uses position (so will skip lapped cars).
Edited (1 time)
Posts: 53
Nick Thissen wrote:
Yes, there is an action for ChangeCamera. You can choose to change the camera group, or the focus of the camera (e.g. which driver you're following). To change focus to another driver select the 'Change Focus' effect. Then, in the Value you can put a number of different things which are unfortunately not very well documented yet. If you put a random character in that field, the warning will tell you what is expected. You can choose from:
  • Position number, e.g. "2" or "P2"
  • Car number with pound sign: "#12"
  • Customer ID: 12345
  • Relative change from the current car to the Nth next / prev car on track: "relative_track(N)" where N is the number of cars on track to go forward or back.
    • relative_track(1): move forward to next car on track
    • relative_track(-3): move backward 3 cars on track
  • Relative change from the current car to the Nth next / prev position: "relative_pos(N)". Similar to relative_track, but uses position (so will skip lapped cars).

Wow, that sounds pretty good! I had no idea about it.

Do you think it would be possible to bind it to Input in the future versions? That we could pick a car position or relative pos via the input form?
Posts: 785
I don't think that will be possible soon, it would require very different kind of logic.

It is possible with a script, but you'd have to dig into the camera controls scripts. Not complicated but I don't know off the top of my head how it works.
Posts: 4
I am also having the same issue with the interface after about 30 minutes it becomes extremely slow and unresponsive.Then I have to restart ATVO and it all runs smooth again.
Posts: 785
Do you also have scripts that keep reporting errors? Please check your error log while running. Scripts that throw (uncaught) errors are a main cause of lag.
Posts: 4
Nick Thissen wrote:
Do you also have scripts that keep reporting errors? Please check your error log while running. Scripts that throw (uncaught) errors are a main cause of lag.

I can't find any errors, have reduced all my icon sizes now and will se if that helps
No errors is displayed under the script performance tab when the teame is runing.