Performance Issues, Timing Screen

Posts: 36
Hello all,

I am still having very similar performance issues like what I had posted about earlier regarding the Timing Screen.
I thought I had it fixed by addressing the 'errors' in my theme, which seemed to help in the short term.

Now, unfortunately the issues are back in a big way. If I watch a live session, and open the timing screen, it immidiately freezes 3 seconds in and will no longer update. The driver selection and camera controls still work, but stats do not update in the Timing screen itself.

I am fairly desperate at this point, as I do have a new league starting on Thursday. I am willing to compensate someone if they could take a look at my theme and offer some diagnosis?
Thank you all so much!

Scott
Posts: 785
Do you have it without a theme opened? With our default theme? Only with your own theme? I suspect an issue in your theme, probably regarding scripts. There are lots of tools included to debug like the script performance window (you have to enable script timing though). I'm confident you have a script that's doing way too much work and throwing errors every update.
Posts: 36
Thanks for the suggestion, Nick! Yes, I think the script is the issue. I only have 1 script in my whole theme. I just deleted it to test, it it seems to work flawless now.
I would like to know where the error might be, but I'm not good with this programming at all. Here is the script below. It pulls a hex color code from a spreadsheet I have loaded. I use this for various backgrounds, identifying the driver's home color. Hope this makes sense, and hope it's an easy fix?
Thanks a bunch, Nick!

using System;
using ATVO.ThemesSDK;
using ATVO.ThemeEditor.ThemeModels;
using ATVO.ThemeEditor.Scripting.DotNET;
using System.Windows.Media;

namespace Scripts
{
public class HexConvert : IScript
{
public object Execute(ThemeContentItem item, object value, string parameter, ISimulation sim)
{
var colorString = value?.ToString();
if (string.IsNullOrWhiteSpace(colorString))
return Color.FromRgb(153,0,0);

return (Color)ColorConverter.ConvertFromString(colorString);
}
}
}

Posts: 36
When I enter the script, I get the green checkmark on the top. Could it drill have an error in it still causing the freeze?
Posts: 785
Can you give an example value of a hex color in the spreadsheet? Are there rows in the spreadsheet without colors (and in that case what is in the color column)? My guess is the color conversion is throwing an exception and that is causing issues. This code should generally be OK for performance unless the color string is not actually a valid color.

Does the script actually work, as in: are you seeing the colors?
Posts: 36
Hi Nick, yes every driver has the hex code. It’s only 16 in the league, and every color is filled.
However, I’ve been doing my testing in one of my other leagues that has a handful of drivers that have the assigned color, but many who don’t. (In which case if the driver is not listed on the spreadsheet, it defaults to red)
Yes, I do see the colors work correctly.
I’ll try to send some screenshots shortly.