We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

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



98.9k
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


3.8k

Could I use the smaller one for production?



98.9k
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


3.8k

Ok, I got it. Thanks.