[jdev] A rapidxml fork for XMPP

mat henshall mat at squareconnect.com
Thu Dec 5 18:50:22 UTC 2013


On Thu, Dec 5, 2013 at 2:20 AM, Alexander Holler <holler at ahsoftware.de>wrote:

> Am 05.12.2013 07:15, schrieb mat henshall:
>
>
>  extremely fast and efficient on small devices. BTW the trick to avoid the
>> tag comparison is to convert the various tags and namespaces to hash
>> values
>> as they come in during parsing and then only compare on the hash value. We
>>
>
> Hmm, I would have assumed most servers already do convert the tags and
> namespaces to something else to not have to handle strings afterwards. I
> don't know If there is a big difference to calc a hash or to compare the
> strings once might make a big a difference in the overall picture (if they
> are sorted by frequency, comparing strings might be faster than calculating
> the hash and then comparing unsorted hashes).
>
>
For server applications with more than enough memory and CPU cycles, I
would not normally bother with this… but in constrained devices this is an
effective way to reduce the constant data space as well as runtime memory
usage. And it was that that drove the original design. When you only have
100k of memory available… 12k in constant data is significant. Ofcourse,
your argument is.. Why bother? Use a binary protocol and don't worry about
the XML.

Which is a legitimate argument, but at the overall system architecture
level, using XML/XMPP at the gateway or device level is often the best
tradeoff… and some of these network devices have really small footprints so
the extra effort in developing an efficient XML handling library fro
extremely constrained devices is worth while within the context of the
overall system architecture.




> _______________________________________________
> JDev mailing list
> Info: http://mail.jabber.org/mailman/listinfo/jdev
> Unsubscribe: JDev-unsubscribe at jabber.org
> _______________________________________________
>



-- 

Mat Henshall
Founder and CEO, Square Connect, Inc.
San Jose, CA
www.squareconnect.com
cell: 650.814.7585
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.jabber.org/jdev/attachments/20131205/c4d57a9d/attachment.html>


More information about the JDev mailing list