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

Implement S/G IO for non-batched sends and eliminate more data copies #2867

Merged
merged 1 commit into from
Jul 18, 2024

Conversation

cgutman
Copy link
Collaborator

@cgutman cgutman commented Jul 16, 2024

Description

This PR implements scatter/gather I/O support in the platform socket code for non-batched sends. Because we can specify separate header and payload buffers, this allows us to eliminate all redundant copies of audio shards. The performance impact of this change alone is quite small, but it will reduce the complexity of the following PR that implements S/G for batched sends.

I also included a drive-by fix for another missing std::vector::reserve() call that was causing horrible performance when using std::copy() with std::back_iterator().

Testing checklist:

  • Windows with FEC validation
  • Mac with FEC validation
  • Linux with FEC validation

Screenshot

Issues Fixed or Closed

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Dependency update (updates to dependencies)
  • Documentation update (changes to documentation)
  • Repository update (changes to repository files, e.g. .github/...)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated the in code docstring/documentation-blocks for new or existing methods/components

Branch Updates

LizardByte requires that branches be up-to-date before merging. This means that after any PR is merged, this branch
must be updated before it can be merged. You must also
Allow edits from maintainers.

  • I want maintainers to keep my branch updated

@cgutman cgutman force-pushed the sg_io_min branch 2 times, most recently from affcc98 to 47d49aa Compare July 16, 2024 05:02
Copy link

codecov bot commented Jul 16, 2024

Codecov Report

Attention: Patch coverage is 1.61290% with 61 lines in your changes missing coverage. Please review.

Project coverage is 9.22%. Comparing base (b93756a) to head (729d538).

Additional details and impacted files
@@            Coverage Diff            @@
##           master   #2867      +/-   ##
=========================================
- Coverage    9.23%   9.22%   -0.02%     
=========================================
  Files          97      97              
  Lines       17440   17451      +11     
  Branches     8314    8300      -14     
=========================================
- Hits         1611    1610       -1     
- Misses      12946   13122     +176     
+ Partials     2883    2719     -164     
Flag Coverage Δ
Linux 6.99% <0.00%> (+<0.01%) ⬆️
Windows 4.53% <0.00%> (+<0.01%) ⬆️
macOS-12 10.31% <2.56%> (-0.01%) ⬇️
macOS-13 10.23% <2.56%> (-0.01%) ⬇️
macOS-14 10.54% <2.63%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
src/platform/common.h 39.74% <ø> (ø)
src/platform/macos/misc.mm 6.71% <9.09%> (-0.14%) ⬇️
src/platform/linux/misc.cpp 8.91% <0.00%> (-0.14%) ⬇️
src/platform/windows/misc.cpp 2.21% <0.00%> (-0.02%) ⬇️
src/stream.cpp 3.33% <0.00%> (-0.09%) ⬇️

... and 22 files with indirect coverage changes

@cgutman cgutman marked this pull request as ready for review July 17, 2024 04:23
@cgutman cgutman enabled auto-merge (squash) July 18, 2024 01:25
@cgutman cgutman merged commit 81c6e61 into LizardByte:master Jul 18, 2024
46 of 47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants