Zack R Johnson wrote:
Most likely your theme needs to be optimized. I recently went through my old theme and condensed things into multiple subwidgets or labels instead of separate widgets for a lot of things like flag colors and things of that nature. Also one thing that seems to help for me, make sure widgets are actually being hidden by show/hide buttons instead of just animations that take opacity to zero.
Nick Thissen wrote:
Lag is very often caused by scripts that are either throwing errors every time or are just inefficient. The first thing to check is the error log and see if your scripts are giving errors, and then fix that. Errors in scripts are super expensive and bad for performance.
Josh Lee wrote:
What are the specs of your system and did you disable hardware acceleration?
Could be possible your CPU or GPU can’t keep up - hardware acceleration will put ATVO on the GPU, while disabling it will put it on the CPU. I’ve found disabling hardware acceleration has helped with performance.
using System;
using ATVO.ThemesSDK;
using ATVO.ThemeEditor.ThemeModels;
using ATVO.ThemeEditor.Scripting.DotNET;
using ATVO.ThemesSDK.Data.Results;
using ATVO.ThemesSDK.Data.Enums;
namespace Scripts
{
public class iRating : IScript
{
public object Execute(ThemeContentItem item, object value, string parameter, ISimulation sim)
{
if (value == null)
{
// do something appropriate, in this case probably just return nothing
return null;
}
IEntitySessionResult result = (IEntitySessionResult) value;
var irating = result.Entity.CurrentDriver.License.IRating;
var thousand = 0;
var hundred = 0;
if (irating > 0)
{
thousand = (int) (irating / 1000);
hundred = (int) (irating % 1000)/100;
return thousand + "." + hundred +"k";
}
else
return "-.-k";
}
}
}
if (value is IEntitySessionResult)
{
//continue
}
else
{
return null;
}