Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tls: Reduce memory copying and number of BIO buffer allocations #31499

Closed
wants to merge 3 commits into from

Commits on Feb 17, 2020

  1. test: Remove sequential/test-https-keep-alive-large-write.js

    Remove a test that made a flawed assumption that a single
    large buffer write can be interrupted by a timeout event.
    rustyconover committed Feb 17, 2020
    Copy the full SHA
    431e3c2 View commit details
    Browse the repository at this point in the history

Commits on Feb 26, 2020

  1. test: change test to not be sensitive to buffer send size

    Change the test to not be sensitive to the buffer size causing
    TCP resets to be received by the client causing the test to fail.
    The test now reads the entire expected buffer and then checks for
    the expected event to fire.
    rustyconover committed Feb 26, 2020
    Copy the full SHA
    7f1e0f8 View commit details
    Browse the repository at this point in the history
  2. tls: Reduce memory copying and number of BIO buffer allocations

    Avoid copying buffers before passing to SSL_write if there
    are zero length buffers involved.  Only copy the data when
    the buffer has a non zero length.
    
    Send a memory allocation hint to the crypto BIO about how much
    memory will likely be needed to be allocated by the next call
    to SSL_write.  This makes a single allocation rather than the BIO
    allocating a buffer for each 16k TLS segment written.  This
    solves a problem with large buffers written over TLS triggering
    V8's GC.
    rustyconover committed Feb 26, 2020
    Copy the full SHA
    3261764 View commit details
    Browse the repository at this point in the history