Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:1175 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 18445 invoked from network); 2 May 2003 17:11:37 -0000 Received: from unknown (HELO asuka.nerv) (24.112.18.98) by pb1.pair.com with SMTP; 2 May 2003 17:11:37 -0000 Received: (qmail 12267 invoked from network); 2 May 2003 17:15:17 -0000 Received: from rei.nerv (HELO dummy.com) (rei@192.168.1.1) by asuka.nerv with SMTP; 2 May 2003 17:15:17 -0000 Reply-To: ilia@prohost.org To: Derick Rethans , Oto Hlincik , internals@lists.php.net Date: Fri, 2 May 2003 13:16:48 -0400 User-Agent: KMail/1.5 References: <004701c310c6$f6f53560$ec03020a@mercyhurst.local> In-Reply-To: Organization: Prohost.org MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-ID: <200305021316.48520.ilia@prohost.org> Subject: Re: [PHP-DEV] Comments within code From: ilia@prohost.org ("Ilia A.") On May 2, 2003 12:56 pm, Derick Rethans wrote: > On Fri, 2 May 2003, Oto Hlincik wrote: > > Quick Question... > > > > How does a large amount of Comments within code (especially Class > > definitions) affect script performance? > > Not that much, it's mostly the reading of it that will take the most > time. It can't be an excuse to not document your code ;) > > Derick If 40%+ of your total script size are comments you may see something like a 2-4% performance boost if you remove those comments for files >40kb. However, this should not be used as an excuse not to write comments and if you are using an opcode compiler the difference is NILL. However, if you absolutely must remove the comments & other useless white space. Before putting your script into a production enviroment run it via 'php -w script_name.php', this will strip out the whitespace and dump you the stripped file to stdout. Ilia