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: 

Will print statements to console cause performance issues

Hi,

Will print statements to console/terminal cause performance issues?. I tried searching but did not find a definitive answer. Any help would be really helpful.

Regards,
Prajwal
0 Kudos
6 Replies
NewManLiving
Level 7

Re: Will print statements to console cause performance issue

From what have read on the forums it may or does on the roku 1 never looked at it myself
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
TheEndless
Level 7

Re: Will print statements to console cause performance issue

Generally speaking, no. If you're not seeing performance issues in your dev channel, it shouldn't be an issue in the production channel, but as a best practice, you might want to either clean up debug output or control it with a flag before publishing.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
sjb64
Level 7

Re: Will print statements to console cause performance issue

As TheEndless said, No ... but, if you put a print statement in a large loop (record deserialization in my case) it can have a tremendous affect, as your Telnet (I use windows) tries to scroll the results up the screen. So, as he said, putting it a dev check, from 'RoApp' directly or stored on init in a 'm.' variable, will then make a massive difference.
FlixRaider channel
0 Kudos
Komag
Level 9

Re: Will print statements to console cause performance issue

I've seen tons of them have a very big effect when loading my game, taking up to 3 or 4 seconds instead of only 1 without them (on slower Rokus). But you would have to have a LOT to matter.
0 Kudos
TheEndless
Level 7

Re: Will print statements to console cause performance issue

"Komag" wrote:
I've seen tons of them have a very big effect when loading my game, taking up to 3 or 4 seconds instead of only 1 without them (on slower Rokus). But you would have to have a LOT to matter.

Yes.. in a 2D API scenario, where frame rate is important, they can definitely cause issues. I was going to mention that, but wasn't sure it was relevant and didn't want to confuse matters.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
Komag
Level 9

Re: Will print statements to console cause performance issue

Ah, yes, that would make sense, I didn't even think to consider that for a regular channel it wouldn't matter nearly as much (except for channel load time I suppose).
0 Kudos