i have been wondering this for a while now, so here goes.
does comments/epmty lines etc. affect how fast a program is running, or cause lagg? or could you write all the harry potter books in comments unnafected? (just theorietical ofc, im not actually planning to write the hp books there :P)
It might cause a slightly longer delay to load the source file from the disk when it is compiled, but it is not transfered in the final executable so it has no impact on program performance
As the above post says, it might cause a longer compile time, depending on the number of comments. Usually, one of the first things a compiler will do is bin all of the whitespace and comments from your code.
I've noticed that compilers offer a "strip comments" compilation option. Whether comments are actually stripped from the program with or without the option depends on the compiler. As for performance, the compiler will ignore any line that begins with a comment token (// or /*). Therefore, processing time is not wasted on comments since comments do not belong in an executable.