Uploaded image for project: 'Xerces-C++'
  1. Xerces-C++
  2. XERCESC-1343

SAX2XMLReaderImpl performance improvement

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.6.0
    • 2.7.0
    • SAX/SAX2
    • None
    • all

    Description

      When doing namespace-aware parsing, the startElement() and endElement() events construct the QName parameter when the value is already available.

      I am submitting a proposed patch, which also removes an unecessary cast, an now-unused data member, and narrows the scope of two variables.

      One additional point that I did not want to address with this patch is whether or not these two if conditions are exclusive:

      if (XMLString::equals(tempAttr->getQName(), nsString))
      nsURI = tempAttr->getValue();
      if (XMLString::equals(tempAttr->getPrefix(), nsString))

      I believe they are, since the QName and the prefix can never be equal, but I was not 100% sure. If the are, then this can be modified to:

      if (XMLString::equals(tempAttr->getQName(), nsString))
      nsURI = tempAttr->getValue();
      else if (XMLString::equals(tempAttr->getPrefix(), nsString))

      Attachments

        1. patch.txt
          7 kB
          David N Bertoni

        Activity

          People

            Unassigned Unassigned
            dbertoni David N Bertoni
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: