Uploaded image for project: 'MINA'
  1. MINA
  2. DIRMINA-1105

SSLHandler buffer handling

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Won't Do
    • 2.0.21, 2.1.1
    • 2.2.0
    • None
    • None
    • Mina Sprint 2.2.0

    Description

      The SSLEngine.wrap() method requires the provided buffer to be 'big enough' to contain any kind of SSL/TLS message. That means 16921 bytes. The way it's implemented is that we allocate such a buffer every time we need to call the wrap method, then we copy the result into a smaller buffer that is injected into thee write queue.

      This is quite ineficient. It would rather be a better idea to use a Thread Local Storage buffer when calling the wrap method, and copy the content into a temporary buffer.

      Another optimization could be to concatenate the successive calls to the wrap method into a single buffer, that will be sent in one shot (it's frequent that more than one call to wrap is needed during the handshake).

      Attachments

        Issue Links

          Activity

            People

              elecharny Emmanuel Lécharny
              elecharny Emmanuel Lécharny
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: