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

Optimization: resizable workers array #3137

Merged
merged 6 commits into from Jan 17, 2022
Merged

Commits on Jan 12, 2022

  1. Optimization: resizable workers array

    Instead of allocating an array of maxPoolSize (~2M) elements for the worst-case supported scenario that may never be reached in practice and takes considerable memory, allocate just an array of corePoolSize elements and grow it dynamically if needed to accommodate more workers.
    
    The data-structure to make it happen must support lock-free reads for performance reasons, but it is simple, since workers array is modified exclusively under synchronization.
    elizarov committed Jan 12, 2022
    Copy the full SHA
    6cd2d38 View commit details
    Browse the repository at this point in the history

Commits on Jan 14, 2022

  1. Apply suggestions from code review

    Co-authored-by: dkhalanskyjb <52952525+dkhalanskyjb@users.noreply.github.com>
    elizarov and dkhalanskyjb committed Jan 14, 2022
    Copy the full SHA
    752aa8c View commit details
    Browse the repository at this point in the history
  2. ~ length -> currentLength

    elizarov committed Jan 14, 2022
    Copy the full SHA
    18a61e9 View commit details
    Browse the repository at this point in the history
  3. ~ remove extra asserts

    elizarov committed Jan 14, 2022
    Copy the full SHA
    7353494 View commit details
    Browse the repository at this point in the history
  4. Copy the full SHA
    ae22a12 View commit details
    Browse the repository at this point in the history

Commits on Jan 17, 2022

  1. ~ Added a test

    elizarov committed Jan 17, 2022
    Copy the full SHA
    b54ed49 View commit details
    Browse the repository at this point in the history