code: public void configureForSpeed()
      {
          // StAX (1.0):
          doCoalesceText(false);
  
          // StAX2:
          doPreserveLocation(false);
          doReportPrologWhitespace(false);
          //doInternNames(true); // this is a NOP
          doInternNsURIs(true);
          doXmlIdUniqChecks(false);
  
          // Woodstox-specific:
          doCacheDTDs(true);
          doParseLazily(true);
  
          /* If we let Reader decide sizes of text segments, it should be
           * able to optimize it better, thus low min value. This value
           * is only used in cases where text is at buffer boundary, or
           * where entity prevents using consequtive chars from input buffer:
           */
          setShortestReportedTextSegment(16);
          setInputBufferLength(8000); // 16k input buffer
      }
docs: Method to call to make the Reader created be as fast as possible reading
  documents, especially for long-running processes where caching is
  likely to help.
  
  See {@link XMLInputFactory2#configureForSpeed} for
  required settings for standard StAX/StAX properties.
  <p>
  In addition to the standard settings, following Woodstox-specific
  settings are also done:
  <ul>
  <li>Enable <code>P_CACHE_DTDS</code>.
  </li>
  <li>Enable <code>XMLStremaFactory2.P_LAZY_PARSING</code> (can improve performance
  especially when skipping text segments)
  </li>
  <li>Disable Xml:id uniqueness checks (and leave typing as is)
  </li>
  <li>Set lowish value for <code>P_MIN_TEXT_SEGMENT</code>, to allow
  reader to optimize segment length it uses (and possibly avoids
  one copy operation in the process)
  </li>
  <li>Increase <code>P_INPUT_BUFFER_LENGTH</code> a bit from default,
  to allow for longer consequtive read operations; also reduces cases
  where partial text segments are on input buffer boundaries.
  </li>
  </ul>