RESOLVED FIXED 287149
[GStreamer] Avoid intermediate copies in GStreamerWebRTCUtils.cpp
https://bugs.webkit.org/show_bug.cgi?id=287149
Summary [GStreamer] Avoid intermediate copies in GStreamerWebRTCUtils.cpp
Adrian Perez
Reported 2025-02-06 06:18:32 PST
Functions x509Serialize() and privateKeySerialize() in Source/WebCore/Modules/mediastream/gstreamer/GStreamerWebRTCUtils.cpp use an intermedia Vector<char> as a temporary buffer to read back the values that have been serialized via BIO_write_*, then create a WTF::String that will contain a copy of the buffer contents. Instead of doing this, we can use BIO_get_mem_data() to pass the underlying buffer used by the BIO functions to create the String, and avoid one copy into the Vector<char> buffer.
Attachments
Adrian Perez
Comment 1 2025-02-06 06:26:07 PST
EWS
Comment 2 2025-02-06 11:18:54 PST
Committed 289953@main (bc904f61e313): <https://commits.webkit.org/289953@main> Reviewed commits have been landed. Closing PR #40117 and removing active labels.
Radar WebKit Bug Importer
Comment 3 2025-02-06 11:19:15 PST
Note You need to log in before you can comment on or make changes to this bug.