Author: sink, Posted: Thu May 31, 2007 5:29 am Post subject: comments affect speed?
Does comments affect site loading time?
The file size will most certainly differ but what about loading time? How does web servers decode .php comments (and what about .html comments)? They just skip the row or do they read it but ignore it?
Previously I have been deleting the functions that i currently don't use but when I want them back it is more work. What if i comment them instead? Does it affect speed?
What do you pros think?
Author: Evaders99, Posted: Thu May 31, 2007 5:55 am Post subject:
Of course the server has to do some analysis within the files.. but generally comments are so small and aren't important, they won't add to the processing time. The most time is spent actually executing instructions and queries.
I wouldn't worry about the comments all in PHP code.
As to HTML, if it is displayed in the "View Source", then it could affect site loading by transfering such unnecessary text between client and server. Again, this is really a small amount too.. I wouldn't worry about shaving a couple of bytes (Just don't try to write novels inside the HTML comments)
Author: sink, Posted: Thu May 31, 2007 6:17 am Post subject: great
Thanks for your help! Now I will rampage with commenting