You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Rob Outar <ro...@ideorlando.org> on 2002/11/18 22:23:17 UTC

Elements vs Attributes Performance wise

Does anyone have any info on the performance impact of using elements vs.
attributes?

Thanks,

Rob


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


Re: Elements vs Attributes Performance wise

Posted by Joseph Kesselman <ke...@us.ibm.com>.
Attributes have a bit of overhead for name-based lookup. On the other 
hand, that may be faster than linearly searching children by name, if 
that's what you want.

General advice is not to try to microoptimize on this basis. Use elements 
for structure, or for things which must contain structure; use attributes 
for simple-valued annotations that help describe that structure.

______________________________________
Joe Kesselman  / IBM Research

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org