There's probably a better way to see if a theme is smooth or not, but this small code allowed me to track the performance of my theme while adding lots and lots of shaders...
local monitor = fe.add_text ("",0,0,fe.layout.width,100)
monitor.align = Align.Centre
monitor.set_bg_rgb (255,0,0)
monitor.charsize = 50
local monitor2 = fe.add_text ("",0,0,1,1)
local monitor_tick0 = 0
local monitor_x0 = 0
fe.add_ticks_callback(this,"monitortick")
function monitortick(tick_time){
monitor2.x ++
if (monitor2.x - monitor_x0 == 10) {
monitor.msg = 10000/(tick_time - monitor_tick0)
monitor_tick0 = tick_time
monitor_x0 = monitor2.x
}
if (monitor2.x >= flw) {
monitor2.x = 0
monitor_x0 = 0
monitor_tick0=0
}
}
You can add it at the end of your layout, it will create a red banner on the top with a number reporting the current frame rate. It works like this: every tick_callback it moves a text object by one pixel, once the object has moved 10 pixels it calculates the time taken. Ideally if you are on a 60Hz screen you should get a pixel movement every 1/60 of a second and on this basis the framerate is calculated and displayed.