We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 86243bc commit 589e5baCopy full SHA for 589e5ba
1 file changed
src/wkwebview/class/url_scheme_handler.rs
@@ -267,6 +267,9 @@ extern "C" fn start_task(
267
.map_err(|_e| crate::Error::CustomProtocolTaskInvalid)?;
268
269
let content = sent_response.into_body();
270
+ // It yields benefits by eliminating buffer copying starting from 88 bytes.
271
+ // However, sizes below 88 bytes cause regressions. 128 bytes as
272
+ // it aligns better with engineering standards and is more human-readable.
273
let data = if content_len < NO_COPY_DATA_THRESHOLD {
274
// Keep small responses on the original copy path; no-copy deallocation costs more.
275
NSData::with_bytes(content.as_ref())
0 commit comments