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?
Evaders99 Site Admin
Joined: Aug 17, 2003
Thu May 31, 2007 5:55 am
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)
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum