2

Possible Duplicate:
Commenting interpreted code and performance

When you include a file in PHP with include() or any other function, its perfomance is affected by the amount of comments of the included file?

(I am not saying I am going to sacrifice legibility)

Community
  • 1
  • 1
eversor
  • 3,031
  • 2
  • 26
  • 46
  • 1
    Very related (so much in fact I consider voting for "close as duplicate"): http://stackoverflow.com/questions/7730948/commenting-interpreted-code-and-performance and http://stackoverflow.com/questions/2731022/do-comments-slow-down-an-interpreted-language –  Oct 16 '11 at 17:53
  • well, this is more related to the performance of inclusion functions in PHP – eversor Oct 16 '11 at 17:57
  • 2
    The effect of comments should be the same regardless of why the file is being parsed (i.e. regardless of whether it's run as "main file" of `include`ed). –  Oct 16 '11 at 18:00

1 Answers1

6

No, the savings of time required to parse the file is not even measurable (too small) and not worth slightest consideration. It's definitely not the bottleneck of performance, so to say.

Mikulas Dite
  • 7,790
  • 9
  • 59
  • 99