“Komag” wrote:
What Roku model number are you using? Text and alpha transparency are a couple things that hurt performance a lot in general. I don’t know the impact of getting the date and time.
You might set up a test function to make a timer, get the date and time 100 or 1000 times, then print the timer results. I’ve used this approach on lots of functions to really tell me how long it’s taking for various things, and it can be eye opening at times.
I’m using a Roku 1 (2710) and a Now TV box (2400), the Now TV box obliterates the Roku 1 for performance, the 1 tends to be very jittery and low fps whereas the Now TV box is pretty smooth. That’s a really good idea, I’ll start testing the speed on some of my functions to see if any can be optomised, and think about adding a FPS counter to my screens too. They aren’t running slow by any measure, it all runs quite well actually, but it just feels that the default roku screen can navigate from letter to letter faster than my screen, but I guess the transparency plays a part in that… Thank you!
“TheEndless” wrote:
I wouldn’t expect grabbing the time to impact performance, but it should be an easy test. Have you commented that part out to see if performance improves?
There’s nothing on that keyboard screen that I’d expect to cause any performance issues, so my guess is there’s something in your code that’s causing the problems. Are you caching and re-using the font? Initializing a font is pretty slow, so if you’re not re-using it, that could definitely be the issue.
On a side note, that’s a nice, clean layout. I like it!
Yes I’ve tried that, but the results are negligible really, I was only concerned about the date and time as the rest of the code is pretty straight-forward and couldn’t be done in any other way, so even if some draw function does affect performance, there’s nothing I can do about that. With the date and time, I have it set up so the date & time are grabbed at startup, the offset in seconds is then used as a reference point for roTimespan which marks every frame. So at 10:04:33, it waits 27 seconds then grabs the date & time again, then again every 60 seconds from that point for accuracy. Do you think this would be faster than getting the roDateTime every frame?
Font’s are initalised on startup and sizes are allocated to an array, so I have obj.Font.Calibri.p16, which is Calibri 16pt (~22px). I’ll go through my code and move out anything that could be initalised at startup to maximize performance.
Thank you very much! It’s a redesign of my current app, I’m having an issue with roGridScreen where the focused item flickers back and forth between two items randomly and I can’t find any way to stop it, so I’m redesigning it from scratch using roScreen. A lot of work it seems! But I’m getting there…