Your Digital Media Has Never Looked So Good

 
prajwalshetty
Topic Author
Posts: 40
Joined: Mon May 18, 2015 8:02 pm

Will print statements to console cause performance issues

Fri Oct 30, 2015 9:19 am

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
 
User avatar
NewManLiving
Posts: 452
Joined: Fri Aug 02, 2013 6:14 pm

Re: Will print statements to console cause performance issue

Fri Oct 30, 2015 11:04 am

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 )
 
User avatar
TheEndless
** Valued Community Member **
Posts: 9231
Joined: Mon Oct 04, 2004 10:15 am
Location: US
Contact:

Re: Will print statements to console cause performance issue

Fri Oct 30, 2015 11:06 am

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)
 
sjb64
Posts: 108
Joined: Thu Apr 16, 2015 1:13 pm
Location: Memphis, TN

Re: Will print statements to console cause performance issue

Fri Oct 30, 2015 11:22 am

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
 
User avatar
Komag
Posts: 808
Joined: Fri Aug 22, 2014 3:42 am

Re: Will print statements to console cause performance issue

Fri Oct 30, 2015 12:04 pm

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.
 
User avatar
TheEndless
** Valued Community Member **
Posts: 9231
Joined: Mon Oct 04, 2004 10:15 am
Location: US
Contact:

Re: Will print statements to console cause performance issue

Fri Oct 30, 2015 9:26 pm

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)
 
User avatar
Komag
Posts: 808
Joined: Fri Aug 22, 2014 3:42 am

Re: Will print statements to console cause performance issue

Sat Oct 31, 2015 2:14 am

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).

Who is online

Users browsing this forum: No registered users and 10 guests