Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 464 Vote(s) - 3.66 Average
  • 1
  • 2
  • 3
  • 4
  • 5
libxml2 vs expat for an XMPP server

#1
I'm trying to create an XMPP library (and later a server) from scratch in [Go][1] (although the language itself is irrelevant) as a means to learn what I can about the XMPP protocol and server software development in general.

As many of you know, XMPP is messaging protocol based on XML that depends on an enormous amount of short but frequent XML streams. I'm thinking that for such applications an event based XML parser should be better because I won't need DOM and all that (correct me if I'm wrong). Please keep in mind that this library is intended for servers so there might be many instances run at once;

Which one of the two has better performance and memory usage for that use case, libxml2 or expat?




[1]:

[To see links please register here]

Reply

#2
There is a whole project devoted to answering the question of XML performance called [XML Benchmark][1].

The short answer, in my opinion, is to use libxml2, but I have other considerations beyond pure performance, such as platform availability. That said, it is generally faster than expat according to the latest numbers, though it's fairly close in the great scheme of things.

And yes, you want to use the SAX parser, not the DOM parser.

[1]:

[To see links please register here]

Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through