Skip to content
Snippets Groups Projects
  1. Mar 26, 2008
  2. Apr 10, 2007
  3. Nov 06, 2006
  4. Sep 08, 2004
  5. Jan 29, 2004
  6. Apr 30, 2003
  7. Apr 03, 2003
  8. Nov 04, 2002
  9. Sep 23, 2002
  10. May 21, 2002
  11. Mar 27, 2002
  12. Feb 01, 2002
  13. Dec 07, 2001
  14. May 11, 2001
  15. Jan 18, 2001
    • Arnaud Le Hors's avatar
      This commit is a port of the latest changes I've made to the Java version, · d67f0d8e
      Arnaud Le Hors authored
      it brings yet another optimization to this DOM implementation.
      The whole idea is to try and avoid to always create a Text node to hold
      the value of an attribute. The DOM spec requires it, so we still have
      to do it in case getFirstChild() is called for instance. The reason
      attribute values are stored as a list of nodes is so that they can carry
      more than a simple string. They can also contain EntityReference nodes.
      However, most of the times people only have a single string that they
      only set and get through Element.set/getAttribute or Attr.set/getValue.
      In this new version, the Attr node has a value pointer which can either
      be the DOMString directly or a pointer to the first ChildNode. A flag tells
      which one it currently is.
      Note that while we try to stick with the direct DOMString as much as
      possible once we've switched to a node there is no going back. This is
      because we have no way to know whether the application keeps referring to
      the node we once returned (I guess that's not so true for C++!).
      
      The gain in memory varies on the density of attributes in the document.
      But in the tests I've run I've seen up to 12% of memory gain in the Java
      version. And the good thing is that it also leads to a slight gain in speed
      because we allocate fewer objects! I mean, that's until we have to actually
      create the node...
      
      To avoid too much duplicated code, I got rid of ParentNode and renamed
      ChildAndParentNode, which I never really liked, to ParentNode for
      simplicity, this doesn't make much of a difference in memory usage because
      there are only very few objects that are only a Parent. This is only true
      now because AttrImpl now inherits directly from NodeImpl and has its own
      implementation of the ParentNode's node behavior. So there is still some
      duplicated code there.
      
      
      git-svn-id: https://svn.apache.org/repos/asf/xerces/c/trunk@172503 13f79535-47bb-0310-9956-ffa450edef68
      d67f0d8e
  16. Sep 19, 2000
  17. Apr 27, 2000
    • Arnaud Le Hors's avatar
      global reorganization similar to what I've done in Java, · be76fd64
      Arnaud Le Hors authored
      nodes now are much smaller.
      The main changes are:
      renamed NodeContainer to ParentNode,
      introduced ChildNode and ChildAndParentNode,
      all the boolean attributes have been changed to bit flags,
      ownerDocument is no longer an attribute of NodeImpl, only Parent nodes have
      it, leave nodes rely on their parent to get it, or get it from ownerNode when
      they do not have a parent,
      parent Nodes no longer have a direct pointer to the last child
      instead the last child is stored as the previous sibling of
      the first child.
      I also added support for importing a DocumentType as it's done in Java,
      and got the importNode mechanism back in sync with Java as well.
      
      Here are the most significant changes in size:
      ElementImpl 52 -> 48
      TextImpl    44 -> 32
      AttrImpl    52 -> 36
      
      
      git-svn-id: https://svn.apache.org/repos/asf/xerces/c/trunk@172078 13f79535-47bb-0310-9956-ffa450edef68
      be76fd64
  18. Apr 19, 2000
  19. Apr 06, 2000
  20. Apr 05, 2000
  21. Mar 02, 2000
  22. Feb 24, 2000
  23. Feb 06, 2000
  24. Feb 04, 2000
  25. Jan 24, 2000
  26. Dec 21, 1999
  27. Nov 09, 1999
Loading