ICEfaces
  1. ICEfaces
  2. ICE-3387

serialize DOM directly to writer

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.7.1
    • Fix Version/s: 1.8DR#1, 1.8
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      ICEfaces

      Description


      When serializing the DOM, ICEfaces currently builds a String internally and then writes the String to the writer. It would be more efficient (particularly on full page updates) to write the DOM directly to the writer.

      Preserve the current API and pass a StringWriter to a new writeDOM() method that accepts a writer. The current implementation that makes use of stringBuffer.append() can simply be replaced with writer.write().

        Issue Links

          Activity

          Ted Goddard created issue -
          Hide
          Ted Goddard added a comment -

          Incremental updates can also make use of the writer directly if the methods:

          writeChildren(Writer writer, Node node)
          writeNode(Writer writer, Node node)

          are implemented (writeNode() is already necessary for the implementation of writeDOM).

          The efficiency gain in this approach is largely from the fact that the memory consumption is bounded. In some cases, pooled strings will be passed to the writer directly and need not be copied into memory (buffering will result in copying, however).

          Show
          Ted Goddard added a comment - Incremental updates can also make use of the writer directly if the methods: writeChildren(Writer writer, Node node) writeNode(Writer writer, Node node) are implemented (writeNode() is already necessary for the implementation of writeDOM). The efficiency gain in this approach is largely from the fact that the memory consumption is bounded. In some cases, pooled strings will be passed to the writer directly and need not be copied into memory (buffering will result in copying, however).
          Mircea Toma made changes -
          Field Original Value New Value
          Assignee Mircea Toma [ mircea.toma ]
          Mircea Toma made changes -
          Fix Version/s 1.7.2 [ 10130 ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #17303 Thu Aug 07 04:08:48 MDT 2008 mircea.toma ICE-3387 Serialize DOM nodes directly into a writer.
          Files Changed
          Commit graph MODIFY /icefaces/branches/icefaces-1.7/icefaces/core/src/com/icesoft/faces/util/DOMUtils.java
          Commit graph MODIFY /icefaces/branches/icefaces-1.7/icefaces/core/src/com/icesoft/faces/context/NormalModeSerializer.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #17304 Thu Aug 07 04:09:02 MDT 2008 mircea.toma ICE-3387 Serialize DOM nodes directly into a writer.
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/context/NormalModeSerializer.java
          Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/util/DOMUtils.java
          Hide
          Mircea Toma added a comment -

          Serialize DOM nodes directly into a writer.

          Show
          Mircea Toma added a comment - Serialize DOM nodes directly into a writer.
          Mircea Toma made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Ken Fyten made changes -
          Link This issue blocks ICE-3082 [ ICE-3082 ]
          Ken Fyten made changes -
          Fix Version/s 1.7.2RC1 [ 10140 ]
          Fix Version/s 1.7.2 [ 10130 ]
          Ken Fyten made changes -
          Fix Version/s 1.8DR#1 [ 10141 ]
          Fix Version/s 1.7.2RC1 [ 10140 ]
          Ken Fyten made changes -
          Fix Version/s 1.8 [ 10161 ]
          Ken Fyten made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Assignee Mircea Toma [ mircea.toma ]

            People

            • Assignee:
              Unassigned
              Reporter:
              Ted Goddard
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: