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

          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).
          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.

            People

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

              Dates

              • Created:
                Updated:
                Resolved: