Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
mco_dolo
Visitor

How to detect a slow device from a fast one

I posted this question on stackoverflow, but wanted to get this forum's thoughts on it. Is filtering by model the only reliable way?
https://stackoverflow.com/questions/490 ... a-fast-one

I have a channel that I want stop animations from happening if running on a slower device like Roku Express and keep them on a faster device like Roku Premiere. Except I'm not sure what's the best way to go about it.
I wanted to filter by the amount of available ram, but I couldn't find an api that gives me available ram for the system that I could run in my code.
I could filter by model name, but I would then need to keep an update list of model names, which I prefer not to do.

Any help/insight appreciated.
0 Kudos
3 REPLIES 3
Komag
Roku Guru

Re: How to detect a slow device from a fast one

- How would RAM effect it?
- Do you want to go by processor speed? Since all current gen Rokus are "fast" (finally!), you could list any older "slow" models and assume all newer ones will continue to be fast.

- You could implement a processor test, like this:
timer = createObject("roTimespan")
FOR _ = 1 TO 1e5: END FOR
time = timer.TotalMilliseconds()
IF time <= 21 THEN gS = 1 ELSE gS = 2

...using whatever variation works for you.
0 Kudos
marcelo_cabral
Roku Guru

Re: How to detect a slow device from a fast one

In general if you use roDeviceInfo object method GetGraphicsPlatform() and check if the device returns "opengl" it will be fast.

Edit:
That was true in the past, but I'm not sure about the Express devices, there are two generations of these, the first did not implemented OpenGL
0 Kudos
RokuNB
Roku Guru

Re: How to detect a slow device from a fast one

See also https://stackoverflow.com/questions/49062067

"marcelo.cabral" wrote:
In general if you use roDeviceInfo object method GetGraphicsPlatform() and check if the device returns "opengl" it will be fast.

Edit: That was true in the past, but I'm not sure about the Express devices, there are two generations of these, the first did not implemented OpenGL
Unlike the old Expresses (37xx), the new ones (39xx) use the same hardware architecture that Premiere/Ultra use, and they should be ringing as OpenGL too. They have lower storage than the premium ones but performance may be on par (i haven't tested).
0 Kudos