Add strlcat variant that uses memccpy for writing SDPs #2835
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We recently found out that the process of creating/writing SDPs could be slow, due to how
g_strlcat
works. This is an attempt to speed that part up by adding ajanus_strlcat
variant that usesmemccpy
instead ofg_strlcat
. It seems to be working as expected in some tests when using SDP fuzzing with a huge (~20k mlines) SDP, as it's basically 10x faster:and a simple test with the EchoTest demo worked flawlessly too, but of course we need to ensure this doesn't break anything in production, hence why this is still a PR and not in master yet, so feedback welcome! Once this is confirmed to be ok, I'll update the multistream branch as well where this enhancement would definitely have more of an impact.