2

I have noticed that when you have a class with large amounts of comments (200+ lines) navigating to that class and auto complete while working on that file slows down significantly.

Does having comments also slow compile time?

THIS IS NOT DUPLICATE

Esqarrouth
  • 38,543
  • 21
  • 161
  • 168
  • Of course it does, at least such files are larger in size and take longer to read and parse through. You might want to paraphrase the question. – A-Live Sep 30 '15 at 09:26
  • 3
    "If you're trying to identify specific files that slow down your compile time": http://stackoverflow.com/a/31614385/2227743 – Eric Aya Sep 30 '15 at 09:31
  • 1
    Bear in mind that actual compile time might not be the same as whatever's slowing down autocomplete and navigation. Incidentally, have you actually tried removing all the comments from that file and comparing the difference? Also, see [this question](http://stackoverflow.com/questions/25948024/xcode-6-with-swift-super-slow-typing-and-autocompletion) for a more general list of suggestions for speeding Xcode editing up with Swift. – Matt Gibson Sep 30 '15 at 09:55

1 Answers1

0

In theory yes.

The compiler needs to read the comments to delete them. But IMHO this part is very quick (for usual source code files) and should have a tiny impact on the whole compilation time.

But again, it's just my opinion bases on common sense.

Luca Angeletti
  • 58,465
  • 13
  • 121
  • 148