nice speedup
| From: | Thies C. Arntzen | Date: | Sat, 08 Dec 2001 12:38:24 +0000 |
| Subject: | nice speedup | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-2210@lists.php.net to get a copy of this message | ||
hi,
by stipping smarty using the new -w (strip) option in the
php-cgi i get something aroung 5% more smary based requests!
how does it work:
get the CVS-version of php (commit is 5 minutes ago) -
compile the cgi-version (olny needed for stripping)
then (in bash)
cd smarty-dir
for file in *php; do
echo $file
php -w $file > $file.tmp
mv $file.tmp $file
done
the filesizes will go from:
-rw-rw-rw- 1 thies thies 9078 Dec 8 13:35 Config_File.class.php
-rw-rw-rw- 1 thies thies 875 Dec 8 13:35 index.php
-rw-rw-rw- 1 thies thies 32109 Dec 8 13:35 Smarty.addons.php
-rw-rw-rw- 1 thies thies 61089 Dec 8 13:35 Smarty.class.php
wrw-rw-rw- 1 thies thies 47177 Dec 8 13:35 Smarty_Compiler.class.php
to:
-rw-rw-rw- 1 thies thies 5126 Dec 8 13:36 Config_File.class.php
-rw-rw-rw- 1 thies thies 862 Dec 8 13:36 index.php
-rw-rw-rw- 1 thies thies 17235 Dec 8 13:36 Smarty.addons.php
-rw-rw-rw- 1 thies thies 27595 Dec 8 13:36 Smarty.class.php
-rw-rw-rw- 1 thies thies 26747 Dec 8 13:36 Smarty_Compiler.class.php
less to load, less to parse;-)
and, you don't need a new php-module.. it just stippes out
unneded whitespace and comments. (poor-mans encrypter;-)
re,
tc