Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Phalcon 2.0's phalcon.so is so big

I had install phalcon 2.0, the phalcon.so file is 300MB, is that normal?

Phalcon 2.0 on my Linux Mint system is 209,104,927 bytes so what you are looking at "should" be ok.

I never realized how big the so becomes lol



84.6k
edited Apr '14

Phalcon 2.0 compiles with all debug symbols enabled by default which creates a big .so, if you want a smaller .so, from a clean clone of Phalcon, you can compile it this way:

cd cphalcon/ext
git checkout 2.0.0
export CFLAGS="-O2 -flto -fvisibility=hidden"
phpize
./configure --enable-phalcon
make
sudo make install


2.5k

Could I use the smaller one for production?



84.6k
Accepted
answer

Phalcon 2 is not ready for production yet. You can use both to test your applications, the smaller one would be slightly faster. Also using zephir and running the following command will build the smaller extension for you:

cd cphalcon
git checkout 2.0.0
zephir build


2.5k

Ok, I got it. Thanks.