This patch adds the ability to compile ejabberd with +native (HiPE) to get better performance (native code). The relevant part has just been submitted upstream. Reproducible: Always Steps to Reproduce: Submitted upstream as https://support.process-one.net/browse/EJAB-412
Created attachment 134626 [details, diff] Add hipe USE flag Patch that adds hipe USE flag to ejabberd. Apply after copying ejabberd-1.1.4.ebuild into ejabberd-1.1.4-r1.ebuild.
Will look at this. As the first question, how will it cope with dev-lang/erlang built with USE="-hipe"? (It is still hard to gracefully depend on a USE-flag being set elsewhere)
If erlang is not compiled with "hipe" and ejabberd is, you get a warning (not an error) at compilation time and the modules are compiled in non-native mode. Not a big deal.
(In reply to comment #2) > Will look at this. As the first question, how will it cope with dev-lang/erlang > built with USE="-hipe"? (It is still hard to gracefully depend on a USE-flag > being set elsewhere) We have EAPI 2 meanwhile to handle those cases.
According to upstream, this feature produces no measurable performance gain but it adds problems (e.g sometimes this produces segfaults (probably fixed or hipe+SMP). Although patch taken upstream they clearly state that this is not recommended: --enable-hipe compile natively with HiPE, not recommended Thus I see no reason adding this into ebuild. In case you want to experiment, just put EXTRA_ECONF="--enable-hipe" into /etc/portage/env/net-im/ejabberd and rebuild ejabberd to get it built with hipe. If you want this feature, please, provide test result of how this is useful. Currently this is NEEDINFO.