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: 
sonnykr
Visitor

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 12
belltown
Roku Guru

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.
0 Kudos
RokuJoel
Binge Watcher

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
Roku Guru

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.
0 Kudos
BradC
Channel Surfer

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. 😄
♦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
Visitor

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
Visitor

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
Roku Guru

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
Visitor

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
Roku Guru

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