skip to Main Content

I know that printing a lot can make some Python code run slower (I’ve tested it and referenced this question). However, I’m not sure if printing a lot makes some Flutter code run slower.

I didn’t include the code because I don’t think code has anything to do with this and I don’t have the code to test it.

Feel free to leave a comment if you need more information.

Does printing a lot make some Flutter code run slower? I would appreciate any help. Thank you in advance!

2

Answers


  1. Well, we preferably use print() in debug mode only. By default, print is disabled in release build of your app, if I’m correct. Unless you call print in loop for over thousand times, it wouldn’t have much of an impact on average phones

    Login or Signup to reply.
  2. Flutter does not recommends print() in release mode

    Juse use as below code

      void prints(var s) {
        if (kDebugMode) {
          print(s);
        }
      }
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search