Just so you know, I grabbed a random piece of code that was using that attributes loop. The code base I'm working on came from a team member who just left, and I'm just trying to speed it up.

Thanks,
-Jeff


Alberto Massari (JIRA) wrote:
[ http://issues.apache.org/jira/browse/XERCESC-1452?page=comments#action_12314869 ]
Alberto Massari commented on XERCESC-1452:
------------------------------------------

Hi Jeff,
the DOMNamedNodeMapImpl class is not used to store attributes in an element 
(that's DOMAttrMapImpl); it is used to store the list of entities, notations 
and elements in a DTD. Can you double check why reducing the size of these 3 
maps improves your performances?

Thanks,
Alberto


DOMNamedNodeMapImpl::item() 10x preformance improvement
-------------------------------------------------------

        Key: XERCESC-1452
        URL: http://issues.apache.org/jira/browse/XERCESC-1452
    Project: Xerces-C++
       Type: Improvement
 Components: DOM
   Versions: 2.6.0
Environment: All environments
   Reporter: Jeff Keasler


10 second bug fix -- change MAP_SIZE constant in DOMNamedNodeMapImpl.hpp from 
193 to 17.
I use literally millions of DomNodes each having 2-10 attributes and 
DOMNamedNodeMapImpl::item() is horribly implemented.  It makes sense to fix the 
problem by changing the definition of MAP_SIZE to 17.  Even people with 50 
attributes will get decent performance if you make this change, wheras the vast 
majority of people who only use 5-10 will see up to a 10x performance 
improvement.
Thank you.




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to