You are here: Re: Is it useful to remove comments & spaces from source code? « PHP Programming Language « IT news, forums, messages
Re: Is it useful to remove comments & spaces from source code?

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

howa wrote:

> we will keep an original codes in the SVN,...
>
> the main point is: around 20-30% of file size are from comments &
> white space, we think that when each time include_once is called,
> dummy information need to be read by PHP interpreter, seems waste of
> cpu time...

Well, simply benchmark the execution time with and without comments.

But I don't think you will see a large increase in performance.
The IO needed to read a few K comments will not be impressive...

Remember that every modern OS caches files on disk in memory, even reducing
that overhead..

If your app is slow, find out why first, or you'll be wasting your time
shooting in the dark.

Regards,
Erwin Moller

>
>
>
>> 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

 

Navigation:

[Reply to this 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

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