What is the difference between "make prod" and "make install"? #4324
-
I noticed a marked difference in the size of the beam created by “make prod” and “make install”. What is the reason? ejabberd version: 24.07 Thanks. #ejabberd |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I say 'simply', but in reality our
Those tools that take care to prepare the release will also take care to reduce the size of beam files:
Notice that there's a new
There shouldn't be any difference: the beam files are loaded into memory at server start, which is done only once, and after that they are in memory, regardless if the included debug information or not, or what was their file size. |
Beta Was this translation helpful? Give feedback.
make install
was manually handcrafted many years ago, it simply copies the files that were compiled to the defined destination.I say 'simply', but in reality our
Makefile.in
includes a lot of code to correctly create the destination paths, copy all the files to the desired destination, etc: see sectioncopy-files
from line 279 to 362.make prod
callsrebar3 release
ormix release
and asks them to build the release. Those building tools use OTP release libraries to actually build the release (see also Adopting Erlang: Releases).Those tools that take care to prepare the release will also take care to reduce the size of bea…