Uploaded image for project: 'Cache Modules'
  1. Cache Modules
  2. MGNLCACHE-35

Delegating ServletOutputStream implementations should delegate calls for writing chunks

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Neutral
    • 5.2.1
    • None
    • None
    • None

    Description

      Currently GZipCacheResponseWrapper.DeferredServletOutputStream and SimpleServletOutputStream only overrides write(byte) and therefore each byte is treated individually when written to the output stream.

      This happens when we're caching, for instance serving pages via RenderingEngine, images from the imaging module and the dam module.

      We also go through this code when the gzip filter wraps the response in order to compress it.

      By implementing write(byte[]) and write(byte[], int, int) we can reduce the amount of work needed both in these classes and the classes being delegated to. Specifically ThresholdingOutputStream can test if the threshold will be exceeded once instead of for every byte.

      The improvements in performance by this fix has been measured to be very limited.

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                tmattsson Tobias Mattsson
                tmattsson Tobias Mattsson
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Task DoD