Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 
sonnykr
Level 7

EPG on Roku

Hey All,

I am going to develop EPG (Electronic Program Guide) on Roku.

1. Would it be better to use ImageCanvas instead of 2D api to build it?
2. Given the fact that there is no recycle views (like Android/iOS), I think the only way is to redraw the bitmap when the user scrolls towards outside of screen. How much of a performance hit would that be?

Thanks!
0 Kudos
12 Replies
belltown
Level 7

Re: EPG on Roku

You may want to take a look at the What's On Channel, which contains a TV program guide. It uses an roImageCanvas for the TV listings display.
https://github.com/belltown/
0 Kudos
Roku Employee
Roku Employee

Re: EPG on Roku

Presumably the Whats On channel uses image canvas, because the EPG is pretty sluggish and annoying, although it could be the API behind it that is slow.

I would suggest you use roScreen and no, it isn't very slow to load a bitmap unless you have to re-download it - use an image placeholder for images that are downloading, cache your images locally as much as possible, as well as your metadata. If you have to re-instantiate a bitmap that is already downloaded, there still might be a small delay, which is why having a placeholder will allow you to have a nice fluid UI.

- Joel
0 Kudos
belltown
Level 7

Re: EPG on Roku

Yes, in the What's On Channel scrolling horizontally through the different time slots is rather slow because the channel retrieves 3 hours' worth of programming data at a time from the API (it takes me about 1.5 secs to get each 3 hours' worth of local TV listings on my Roku 2; cable and satellite listings obviously take longer). However, scrolling vertically through the list of channels for a given time is much faster (about 0.75 secs per page on my Roku 2). The horizontal scrolling would be just as fast if more time-slot data were loaded ahead of time.

I'm sure the roScreen would scroll even faster assuming the data was loaded in memory ahead of time, and maybe just as slow if there were intervening API calls involved. Although implementing an roScreen solution seems like more work than using an roImageCanvas.
https://github.com/belltown/
0 Kudos
BradC
Level 7

Re: EPG on Roku

"belltown" wrote:
You may want to take a look at the What's On Channel, which contains a TV program guide. It uses an roImageCanvas for the TV listings display.



thanks for this! I have needed a channel guide for a while, and was going to make my own because I didn't know one existed.


I like it. Smiley Very Happy
♦MiniGolf♦HangMan♦Brain Puck♦Retro Tennis♦BORK♦FLIP♦Pathogen♦Pathogen 2♦Shut the Box♦Birdie♦Logic♦Dots♦Pool♦küglo♦Bubble Wrap♦Trivia Channel♦Mancala♦Air Hockey♦Weather♦CAMERA♦Your Photos Screensaver♦Desert Beauty Screensaver♦Wild Lakes Screensaver♦
0 Kudos
sonnykr
Level 7

Re: EPG on Roku

Thanks Belltown and Joel for the input. I think Im gonna use 2D api for this. I hope it will work well on legacy devices as well.
0 Kudos
Rek
Level 7

Re: EPG on Roku

"sonnykr" wrote:
Thanks Belltown and Joel for the input. I think Im gonna use 2D api for this. I hope it will work well on legacy devices as well.


Welcome to the black magic art of ifDraw2D.

The 2D api can be painfully slow on Roku 2's or lower. In my experience, the Roku 3 is 7-11x faster than the Roku 2. If you require a good user experience on anything other than Roku 3, I strongly recommend you develop (and optimise) your app using one of the less powerful devices (Roku 2, Roku 1, Roku XD, etc). Failing to do this may result in an app that works great on Roku 3 but get's 0.2 fps on Roku 2.
0 Kudos
squirreltown
Level 9

Re: EPG on Roku

"Rek" wrote:
The 2D api can be painfully slow on Roku 2's or lower.


I've built some pretty drawing-intensive stuff and also a fair number of grids and UI's. I can only speak to the 3100 2SX (2012) since i have one, but as far as that goes, I see the same performance as my Roku3. If you are seeing a big difference, I'd suggest evaluating how you are doing things. The Roku 3 is way faster in creating bitmaps for instance, but for simply drawing to the screen, there is no noticeable difference until you start stacking a ton of large things on top of each other.
Kinetics Screensavers
0 Kudos
NewManLiving
Level 7

Re: EPG on Roku

Having recently purchased the 2 and LT
They both are slower than 2xd and I would
Assume 2xs ( don't have that one yet)
I was able to port my grids and spreadsheets
(They are the most graphic intensive in my arsenal)
And was not disappointed in performance but to
Retain perfect fluidity without that annoying
Jarring that is common on the home screens
(Although it was very slight) It appears that alpha blending and drawtext
Needs to be addressed. Since I use region scrolling
Drawtext is always kept to a minimum so that
Took care of itself. But I needed to hide any
Alpha blending during instense graphic operations
Such as fast scrolling. I also needed to look at
Alpha blending in general as it is handled differently
But that seemed to do it for me. Unless I discover
Something else down the road
My Channels: 2D API Framework Presentation: https://owner.roku.com/add/2M9LCVC
Updated: 11-11-2015 - Completed Keyboard interface
The Joel Channel ( Final Beta )
0 Kudos
Komag
Level 9

Re: EPG on Roku

(NewManLiving - why do many of your posts have that odd line-break thing going on with the auto-capitalization on each line?) :?:

The Roku 2 XS (and probably the others in it's same lineup) are the second strongest Rokus available right now, so to properly test performance you need to try weaker Rokus too.
0 Kudos