How and how many comments will affect application performance?

I created a small Ruby on Rails 3 application. In my file, I commented on a lot of code, which serves to document each method in detail. The documentation for each file is about a quarter of the total file.

How and how much will this affect application performance? Running a production environment (possibly compiling an application), comments will be evaluated when downloading files or when downloading, will they be completely ignored without affecting performance?

+3
source share
3 answers

. , , , Ruby .

, cache_classes, config/environments/production.rb ( - ):

# The production environment is meant for finished, "live" apps.    
# Code is not reloaded between requests
config.cache_classes = true

! - Past-You .

+5

, , .

+5

I think the answers may be missing. In another environment, I supported the version of the development code (fully commented); and the implementation process will carry the code, but not the comments (for the sake of performance). If you are confident in your implementation procedure, you can get the best of both worlds.

Without answering this question, but clarifying what would be ideal - no production overhead, but still fully commented on the code.

And, as already mentioned, never judge the comments. Rather too much than too little.

0
source

Source: https://habr.com/ru/post/1791537/


All Articles