Reply to Re: Is it useful to remove comments & spaces from source code?

Your name:

Reply:


Posted by Erwin Moller on 01/30/07 14:35

howa wrote:

> will performance increae if I removed comments & space from source
> code using php -w ...?
>
> given that i don't need to modify the source code, & don't use any
> cache?

Hi

php -w will return the stripped sourcecode (whitespace and comment).
It will not run the script.

If you reduce your filesize by removing comments, you will get:
1) a slightly faster execution (don't expect too much).
2) A headache if you want to modify the code and the usefull comments are
stripped out.

My advise: Don't do it.

If your application is slow, find out why. I am quite sure it is NOT the
commentlines that makes the application slow.

Just do some simple profiling, using microtime() to store the time for each
thing that happens in your script.
In my experience, 9 out of 10 times the reason for slow webapps is a poorly
designed database, or poorly designed query logic.
for example: running 40 seperate queries to build 1 page.

Regards,
Erwin Moller

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация