PDA

View Full Version : Should I keep in the Comments?


dajohnson1s
01-01-2009, 09:57 AM
Hello,

This is probably more of a preference thing, but I have been reading that removing comments will 'speed up' my application. In this case, it is a campus map via google maps api.

While I understand the concept of fewer lines means fewer lines to read...also there is usually just a one or two liner to say what is happening/what the function does. Personally, I could really careless if they are there or not, but my boss is concerned about future maintenance [and has gone as far as ask for a server-side management area] because I am a student worker.

My concern is that it loads bloody slow. I would like to speed up load times, but my experience is somewhat limited. I have written a few apps, but efficiency never is an issue/ never considered.

Any help would be much appreciated.

oracleguy
01-01-2009, 10:10 AM
What kind of comments are we talking about? HTML comments or comments in your server side code?

In the case of the former it will only slow it down in the sense that it makes the HTML document bigger so there is more data to transfer to view the page. In the case of the latter, they really make no difference since the interpreter just ignores the comments and they aren't even sent in the page the user sees.

dajohnson1s
01-01-2009, 09:31 PM
Oracleguy,

that is what I thought. There are very little html comments/javascript comments and I really didn't see it being worth it to remove them.

But I am kind of stuck as to how I could speed up my map.

any suggestions?

BubikolRamios
01-02-2009, 10:37 PM
look for gzip, and allso at least valid for jsp, if you leave nicely formated server side code and no gzip , you send a ton of needless spaces ower the net.

jerry62704
01-02-2009, 10:53 PM
A few hundred bytes of comments are not going to slow you down to any degree that you can see. The problem has to be elsewhere.

Say you have 45K in comments. On a slow modem connection that would add up to what - six seconds? And I'll bet you don't have 45K in comments and you don't use a 56K modem.

Parry
01-05-2009, 02:44 PM
Hi,
Dude i don't understand What are you really want to say.
So please clear your thought.So, We understand your question easily
And We will help you better.
You also reach me at my signature.
I will gonna happy to help you.
Thanks
___________________
bannerblindness (http://www.********************)