compile ejabberd's xml component natively
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ejabberd (Gentoo Linux) |
Unknown
|
Medium
|
|||
ejabberd (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: ejabberd
From Jack Moffit's blog post http://
Whenever an XMPP server or client writes stanzas to the wire, it must serialize its internal XML representation to real XML. This serialization process is the biggest consumer of clock cycles in XMPP code. Ejabberd is no exception, but you can make serialization almost ten times faster with this little trick.
Erlang comes with a native code compiler called HiPE (High Performance Erlang). One of the great things about Erlang is that you can mix native modules and byte-compiled modules freely. We're going to native compile the ejabberd XML routines to achieve the speed boost.
First, you'll need some ejabberd source code. The file we want to compile is ejabberd/
Next, go to the directory with xml.erl and run the compiler:
cd ejabberd/src
erlc +native xml.erl
Finally, move the xml.beam file into your ebin directory. On Ubuntu, this is normally /usr/lib/
That's it! Now you're XML routines will execute much faster! It would be great if the ejabberd team made this the default for CPU hungry modules
Changed in ejabberd: | |
status: | Unknown → Confirmed |
Changed in ejabberd: | |
status: | Confirmed → Invalid |
Changed in ejabberd (Gentoo Linux): | |
status: | Invalid → Unknown |
Changed in ejabberd (Gentoo Linux): | |
importance: | Unknown → Medium |
I don't follow - is this bugreport too old to be relevant anymore, there is /usr/lib/ ejabberd/ ebin/xml. beam (and also xml_stream.beam) in the ejabberd package shipped even already in hardy. I guess this is sufficient to set this bugreport to invalid, unless you are able to offer additional information on what you want to have changed?
Thanks,
Rhonda