Forum Discussion

prajwalshetty's avatar
11 years ago

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

6 Replies

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