Not a bad choice, but... [was:Re: PEAR::Strip_Comments]

From: Date: Thu, 29 Apr 2004 23:42:54 +0000
Subject: Not a bad choice, but... [was:Re: PEAR::Strip_Comments]
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-12235@lists.php.net to get a copy of this message
I used my time today to write a handy class that takes care of the stripping of comments and doc-blocks in php-Files. As a side-effect, I got me a neat little code-obfuscator, that may turn out to be quite usefull for JavaScript-Files. BTT: I did some tests on including various PEAR-classes. Needless to say that the filesize could be optimized to a minimum, yet the performance-boost is somewhat ranging from remarkable to "I don't notice anything". That all depends on how much comments there where added and which packages you would like to include. For example, stripping the comments from the MDB-Package saves you 0,010 seconds ( ~ 0,050 with comments, ~ 0,040 without comments). That may not be too much, but I see a use for people who want to increase a little bit the performance and are not able to install an accelerator (shared hosting, baby!). I will clean up the code and try to release it on PEAR. It will not be a class-cacher in the first way as it was planned to be, but it can be used as such. The main purpose will be to get a stripped version of the code one wrote and even stripped versions of JavaScript-prototypes. At least this will do a remarkable speed-up in href'ing huge prototype files (less network-traffic). Anyway, who cares about the comments in a JavaScript-file? ;) Regards Thorsten

« previous php.pear.general (#12235) next »