Hi,
You can use /get_declared_classes/ at the end of your script, to find
out, which classes exactly are only (for that request), so can can copy
all files you need (or delete all files you not need ;)). In Development
this seems not very comfortable to me, because integrating new features
will force you to insert class-files by hand, but in a
production-release this allows you to reduce file size rapidly.
Then you are able to remove all Doc-Blocks and Comments (as Thomas said)
and also reduce all Whitespace (including\n,\r,\t,...) to a sinlge one.
You can write a script using PHPs /get_token_all/ to do this for you.
Also you are able to put all class into one single file, to avoid
loosing discspace occured by the cluser-size of your filessystem. So two
4kb files on FAT32 will also use both 32kB on your disc, makes 64kB.
Using one file will reduce this to one file of 8kB using 32kB on your
FS. But this may be a bad idea, because than every request all classes
are loaded.
What i mean: There are some possibilities, to reduce file size, but not
all are useable ;) This one are all useable without an additional
component, like an Encoder.
Greetings,
Sebastian
Thomas Weidner schrieb:
Hy,
The framework is build as module library.
So if you don't use a part of the framework you don't need to copy it
into your production site.
As example:
If you don't need the documentation on your p-site delete it... 45MB
gone.
If you don't need the incubator.... 3 MB gone.
If you don't need the test-bed... 18MB gone.
Same for demo, build-tools and scripts... 1MB gone.
So 29MB left... this is much smaller than the 120 MB you told us.
But I dont expect that you need ALL modules from the framework...
Even in the library ordner you can delete the modules which you dont
need.
The biggest modules are:
The localization framework because of the CLDR: 12 MB. The content are
XML files and XML files use space ;-)
PDF class: 1,6 MB
Search_Lucene: 1 MB
GData: 780 MB.
One simple way to get all shrinked, if you think this is needed, is to
secure your code with Zend_Gard or IONCube for example.
Or you can delete all API-Doc blocks per hand... but this is much work
;-)
Anyway...
I use much classes and my used framework has not more than 3 MB after
I "garded" it.
As the framework is NO PEAR LIBRARY we will not make it "partitially"
downloadable.
But you can erase the unneeded parts as described before.
Greetings
Thomas
I18N Team Leader
----- Original Message ----- From: "Zuhair" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Saturday, July 21, 2007 6:56 AM
Subject: [fw-general] ZF is ubeatable BUT...
Zend Framework will certainly bring about a major paradigm shift in
the PHP
spectrum and I am very impressed by the quality of code it offers BUT
the
only thing that has been discouraging me from adopting this remarkable
framework is that it wants to become yet another pear library. I want
all my
code, including the framework to be an integral part of my
application. In
effect, I make sure to the extent possible that the only dependency
to my
application will be PHP itself. This is where the size of ZendFramework
comes into play. Let's say that I am developing an e-commerce product
which
I want to sell and I want it to work out of the box on any standard PHP5
hosting. In this case, I cannot afford to have 120MB of framework
code where
as my actual application code is hardly 2MB. The zend-framework must
provide
an option for the users to pick and use one or some of its features
independently so that I can get away with picking only the MVC, DB
and AUTH
parts and greatly reduce the code overhead.
Correct me if I am wrong.
--
View this message in context:
http://www.nabble.com/ZF-is-ubeatable-BUT...-tf4120835s16154.html#a11719532
Sent from the Zend Framework mailing list archive at Nabble.com.