Skip to content

perf(fetch): share retained response body backing - #393

Open
ldm0 wants to merge 1 commit into
mainfrom
perf/share-response-body-backing
Open

perf(fetch): share retained response body backing#393
ldm0 wants to merge 1 commit into
mainfrom
perf/share-response-body-backing

Conversation

@ldm0

@ldm0 ldm0 commented Sep 5, 2026

Copy link
Copy Markdown
Member

Fold in the required valid UTF-8 storage reuse so this branch is one self-contained commit on main. Share materialized payloads across fetch, navigation, and subresource response carriers while preserving exact non-UTF-8 bytes.

Derived from 702e8c93d and 97a37e558 on webfetch-inspection. Prefer merging perf/reuse-utf8-response-storage first; this branch includes that prerequisite.

Fold in the required valid UTF-8 storage reuse so this branch is one self-contained commit on main. Share materialized payloads across fetch, navigation, and subresource response carriers while preserving exact non-UTF-8 bytes.

Derived from 702e8c93d and 97a37e558 on webfetch-inspection. Prefer merging perf/reuse-utf8-response-storage first; this branch includes that prerequisite.
@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown

Spider Bench A/B

✅ All benchmark browser service runs completed; results are informational.

Public HEAD: 184 / 240 rows; 38 / 48 sites produced rows; 10 unexpected empty sites.

✅ Deterministic fixture contract is clean.

Common ancestor 9464837d57a9 → HEAD 0bf2ec7cb1e2; benchmark order: head-first; workflow: success.

Public 48-site run · informational

Metric Base HEAD Δ
Run status success success
Extracted rows / contract 184 / 240 184 / 240 0 (0.00%)
Contract fill 76.67% 76.67% 0.00 pp (0.00%)
Sites with rows 38 / 48 38 / 48 0 (0.00%)
Sites meeting row contract 36 / 48 36 / 48 0 (0.00%)
Unexpected empty sites 10 10 0 (0.00%)
Partial-row sites 2 2 0 (0.00%)
Site outcomes extracted: 37; HTTP error + rows: 1; empty: 7; HTTP error + empty: 1; snapshot error + empty: 2 extracted: 36; HTTP error + rows: 2; empty: 7; HTTP error + empty: 1; snapshot error + empty: 2
Observed duration 45.95 s 52.35 s +6.40 s (+13.93%)
Estimated CPU 44.91 s 48.77 s +3.86 s (+8.59%)
Peak PSS 210.26 MiB 240.81 MiB +30.55 MiB (+14.53%)
Peak RSS 213.94 MiB 244.44 MiB +30.50 MiB (+14.25%)
Peak threads 26 26 0 (0.00%)
Mismatched sites 0 0 0
Timeout with items 0 0 0
Category rows Base HEAD Δ
news 35 / 40 35 / 40 0
stocks 20 / 40 20 / 40 0
tech 35 / 40 35 / 40 0
sports 27 / 40 27 / 40 0
games 37 / 40 37 / 40 0
life 30 / 40 30 / 40 0

Public-site content, timing, and memory are noisy. This single A/B run reports evidence only; site outcome counts explain missing rows without treating them as a deterministic regression.

CPU and memory timelines

These are bounded 40-point views of the same complete process-tree samples used by the HTML report. CPU uses 100% per occupied logical core; memory lines are RSS first and PSS second when complete PSS samples are available.

Base

xychart-beta
    title "Base CPU"
    x-axis "Elapsed seconds" [1.536, 2.538, 4.039, 5.041, 6.042, 6.543, 7.544, 9.046, 10.048, 11.549, 13.051, 14.053, 15.554, 16.556, 18.059, 19.06, 20.06, 20.561, 21.563, 23.064, 24.566, 25.067, 25.568, 27.069, 28.07, 29.572, 30.573, 32.074, 33.075, 34.577, 36.078, 37.08, 38.581, 39.583, 41.084, 42.086, 43.588, 44.589]
    y-axis "CPU percent" 0 --> 500
    line [131.89, 121.82, 147.71, 149.71, 237.86, 153.61, 173.93, 107.93, 11.99, 127.91, 109.95, 127.86, 97.92, 119.84, 13.96, 43.98, 0, 51.89, 109.89, 107.89, 109.71, 109.8, 119.85, 57.84, 151.82, 183.85, 17.96, 73.92, 7.99, 135.89, 93.86, 0, 11.99, 2, 121.81, 151.82, 59.84, 123.86]
Loading
xychart-beta
    title "Base memory: RSS then PSS"
    x-axis "Elapsed seconds" [0.035, 1.536, 2.538, 4.039, 5.041, 6.042, 6.543, 7.544, 9.046, 10.048, 11.549, 13.051, 14.053, 15.554, 16.556, 18.059, 19.06, 20.06, 20.561, 21.563, 23.064, 24.566, 25.067, 25.568, 27.069, 28.07, 29.572, 30.573, 32.074, 33.075, 34.577, 36.078, 37.08, 38.581, 39.583, 41.084, 42.086, 43.588, 44.589, 45.95]
    y-axis "Memory MiB" 0 --> 500
    line [11.94, 104.53, 113.03, 137.29, 167.49, 171.8, 186.79, 171.89, 186.26, 181.97, 173.64, 174.23, 184.03, 168.84, 174, 156.66, 151.44, 148.87, 147.67, 187.7, 170.03, 183.42, 213.94, 177.32, 167.35, 198.39, 165.76, 155.09, 151.87, 161.8, 207.69, 202.85, 180.42, 162.93, 162.86, 201.41, 172.87, 171.12, 177, 0]
    line [8.58, 100.79, 109.27, 133.58, 163.8, 168.12, 183.08, 168.14, 182.53, 178.21, 169.89, 170.48, 179.9, 165.13, 170.24, 152.9, 147.68, 145.11, 143.92, 183.95, 165.54, 179.74, 210.26, 173.63, 163.58, 194.68, 162.01, 151.34, 148.12, 158.04, 204.06, 199.17, 176.67, 159.18, 159.11, 198.28, 169.15, 167.39, 173.25, 0]
Loading

HEAD

xychart-beta
    title "HEAD CPU"
    x-axis "Elapsed seconds" [1.534, 2.536, 3.037, 4.039, 4.54, 6.042, 7.544, 9.046, 10.047, 11.549, 13.052, 14.555, 16.056, 17.558, 19.06, 20.561, 22.064, 23.566, 25.067, 26.568, 27.569, 29.071, 30.573, 32.075, 33.576, 35.078, 36.58, 38.082, 39.585, 41.085, 42.087, 42.589, 44.089, 45.09, 46.594, 48.095, 49.597, 51.098]
    y-axis "CPU percent" 0 --> 500
    line [125.95, 113.68, 135.82, 113.78, 93.82, 279.29, 175.9, 79.97, 155.73, 141.89, 55.95, 127.7, 0, 83.8, 84, 11.97, 35.99, 3.99, 145.95, 109.96, 139.89, 141.71, 143.72, 65.86, 117.88, 79.78, 73.81, 43.89, 1.99, 137.72, 119.78, 101.7, 119.91, 13.99, 49.85, 113.87, 11.99, 111.93]
Loading
xychart-beta
    title "HEAD memory: RSS then PSS"
    x-axis "Elapsed seconds" [0.034, 1.534, 2.536, 3.037, 4.039, 4.54, 6.042, 7.544, 9.046, 10.047, 11.549, 13.052, 14.555, 16.056, 17.558, 19.06, 20.561, 22.064, 23.566, 25.067, 26.568, 27.569, 29.071, 30.573, 32.075, 33.576, 35.078, 36.58, 38.082, 39.585, 41.085, 42.087, 42.589, 44.089, 45.09, 46.594, 48.095, 49.597, 51.098, 52.349]
    y-axis "Memory MiB" 0 --> 500
    line [11.93, 98.91, 115.91, 125.38, 131.55, 145.64, 160.06, 162.3, 157.09, 184.98, 161.64, 169.38, 171.24, 158.11, 141.57, 142.98, 133.88, 137.42, 134.04, 154.16, 158.16, 165.79, 181.06, 193.55, 162.04, 171.2, 145.09, 148.77, 150.69, 146.15, 181.55, 244.44, 244.31, 187.84, 165.42, 170.34, 180.89, 158.68, 165.69, 0]
    line [8.68, 95.37, 112.48, 121.62, 127.85, 141.91, 156.76, 158.5, 153.29, 181.18, 157.84, 164.33, 167.39, 154.26, 137.71, 138.61, 130.04, 133.58, 130.2, 150.28, 154.58, 161.84, 177.21, 189.75, 158.26, 167.37, 141.29, 145.03, 146.89, 142.34, 177.55, 240.81, 240.49, 184.05, 161.63, 164.51, 177.1, 154.87, 161.88, 0]
Loading

Deterministic fixture · required contract

The fixture exercises 15 routes: 8 are expected to emit rows and 7 intentionally exercise empty, loading, or timeout behavior.

Metric Base HEAD Δ
Run status success success
Extracted rows / contract 40 / 40 40 / 40 0 (0.00%)
Contract fill 100.00% 100.00% 0.00 pp (0.00%)
Sites with rows 8 / 15 8 / 15 0 (0.00%)
Sites meeting row contract 15 / 15 15 / 15 0 (0.00%)
Unexpected empty sites 0 0 0
Partial-row sites 0 0 0
Site outcomes extracted: 7; HTTP error + rows: 1; empty: 3; timeout + empty: 4 extracted: 7; HTTP error + rows: 1; empty: 3; timeout + empty: 4
Observed duration 19.88 s 19.88 s +0.00 s (+0.01%)
Estimated CPU 0.43 s 0.42 s -0.01 s (-2.32%)
Peak PSS 57.33 MiB 57.11 MiB -0.22 MiB (-0.39%)
Peak RSS 60.96 MiB 60.80 MiB -0.16 MiB (-0.26%)
Peak threads 18 18 0 (0.00%)
Mismatched sites 0 0 0
Timeout with items 0 0 0

Full HTML, JSON, CSV, logs, and page snapshots: workflow run and full spider-bench-results artifact.

The public-web A/B is informational. The exact HEAD fixture contract runs as a separate required CI check; timing and public-site content deltas remain non-blocking.

@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown

Sequential Navigation Soak A/B

✅ HEAD completed the 200-navigation resilience and memory observation.

One browser process, one target, and one CDP session navigate CSDN → SegmentFault → Huaban → example.com repeatedly. This run issued 200 Page.navigate commands per binary.

Common ancestor 9464837d57 → HEAD 0bf2ec7cb1; benchmark order: head-first; workflow: success.

Session resilience

Metric Base HEAD
Attempted / planned 200 / 200 200 / 200
Direct observable pass 200 / 200 200 / 200
Failures / recovered 0 / 0 0 / 0
Recovery failures 0 0
Lifecycle order violations 0 0
Network order violations 0 0
Wall time 253.8 s 253.5 s

A public-page failure is reported separately from an unrecoverable session. The soak requires all navigation attempts, zero failed recovery, zero lifecycle/network ordering violations, and complete resource evidence.

Process-tree memory

Metric Base HEAD Δ
Boundary samples 200 200 0
Boundary RSS samples 200 200 0
Boundary PSS samples 200 200 0
Periodic peak RSS 229.6 MiB 208.1 MiB -21.5 MiB
Periodic peak PSS 225.9 MiB 206.7 MiB -19.2 MiB
RSS · first 10 avg 166.5 MiB 157.0 MiB -9.5 MiB
RSS · last 10 avg 162.2 MiB 155.8 MiB -6.4 MiB
RSS · last − first window -4.3 MiB -1.2 MiB +3.1 MiB
RSS · warm slope / 100 nav +2.0 MiB +1.6 MiB -0.3 MiB
PSS · first 10 avg 162.8 MiB 153.4 MiB -9.5 MiB
PSS · last 10 avg 158.5 MiB 152.2 MiB -6.4 MiB
PSS · last − first window -4.3 MiB -1.2 MiB +3.1 MiB
PSS · warm slope / 100 nav +1.9 MiB +1.7 MiB -0.2 MiB
Peak file descriptors 60 60 0
Peak threads 31 31 0

HEAD memory by 50-navigation quarter

HEAD range Avg RSS Final RSS Peak RSS Avg PSS Final PSS Peak FD
1–50 154.1 MiB 145.0 MiB 190.3 MiB 150.5 MiB 141.4 MiB 57
51–100 154.1 MiB 140.9 MiB 172.9 MiB 150.5 MiB 137.2 MiB 48
101–150 157.2 MiB 147.7 MiB 195.7 MiB 153.7 MiB 144.1 MiB 48
151–200 156.2 MiB 142.9 MiB 173.9 MiB 152.6 MiB 139.2 MiB 50

Raw reports and per-navigation boundary samples: workflow run and full sequential-navigation-soak-results artifact.

Public-site timing and memory are observational. Use the A/B deltas and trend shape as evidence, not as a deterministic performance threshold.

@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown

CI Regression Report

Source CI run · source state at render: in_progress · artifacts: 5/5

Check Status Signal
Release regression HEAD/base failures 0/0; raw binary −0.000138%
Frontend differential 1,020/1,020 cases matched; 0 issues
Agent episodes 8/8 Moli episodes passed; 0 failures
Runtime/CDP contracts 26 contract cases; 0 failures
CDP smoke 43/43 groups passed; 450 scenarios
Release regression — ✅ HEAD/base failures 0/0; raw binary −0.000138%

Package and image size

Metric Base HEAD Delta Delta %
Raw binary 149.08 MiB 149.08 MiB −216 B −0.000138%
Stripped binary 103.35 MiB 103.35 MiB −4.00 KiB −0.003780%
gzip binary 50.15 MiB 50.15 MiB +1017 B +0.001934%
Rootfs 155.99 MiB 155.99 MiB 0 B 0.00%
gzip rootfs 58.97 MiB 58.97 MiB +2.10 KiB +0.003479%

Startup latency and PSS

Case Base p50 HEAD p50 Delta Base PSS HEAD PSS Delta
Serve ready 27.03 ms 27.02 ms −0.01 ms 4.21 MiB 4.06 MiB −157.00 KiB
CDP first page 50.35 ms 50.48 ms +0.13 ms 3.30 MiB 3.17 MiB −133.00 KiB
CDP warm page 12.75 ms 12.66 ms −0.10 ms 48.57 MiB 48.17 MiB −412.00 KiB
CLI about:blank 13.11 ms 13.54 ms +0.43 ms 2.86 MiB 3.97 MiB +1.11 MiB
CLI local JS 17.10 ms 16.60 ms −0.50 ms 2.31 MiB 2.30 MiB −3.50 KiB

Concurrency matrix

Concurrency Base p50 HEAD p50 Delta Base PSS HEAD PSS Delta HEAD failures Unstable B/H
1 15.30 ms 15.26 ms −0.04 ms 567.00 KiB 568.00 KiB +1.00 KiB 0 0/0
5 19.44 ms 18.53 ms −0.90 ms 17.03 MiB 26.54 MiB +9.52 MiB 0 0/0
10 19.16 ms 18.21 ms −0.94 ms 26.42 MiB 17.68 MiB −8.74 MiB 0 0/0
25 19.78 ms 18.79 ms −1.00 ms 13.40 MiB 22.02 MiB +8.62 MiB 0 0/0
100 18.44 ms 19.52 ms +1.08 ms 37.45 MiB 26.33 MiB −11.11 MiB 0 0/0
Frontend differential — ✅ 1,020/1,020 cases matched; 0 issues
Match DOM mismatch Diagnostic mismatch Moli error Reference error Infrastructure error Mismatched frames Duration
1,020 0 0 0 0 0 0 6m 47.30s
Agent episodes · Moli vs Chromium — ✅ 8/8 Moli episodes passed; 0 failures
Fast contract Episodes Passed Assertions Ready p50 Episode p50
Moli 8 8 47/47 4.05 ms 28.59 ms
Chromium 8 8 47/47 270.61 ms 88.48 ms
Operation p50 Chromium Moli Delta Delta %
navigate 43.29 ms 9.31 ms −33.98 ms −78.50%
observe 0.96 ms 0.86 ms −0.09 ms −9.80%
fill 3.89 ms 3.33 ms −0.57 ms −14.53%
click 6.42 ms 3.82 ms −2.60 ms −40.50%
Idle-resource episode Peak RSS Peak PSS Average CPU Peak CPU Peak processes Sampler
Moli 63.19 MiB 61.42 MiB 0.68% 8.01% 1
Chromium 1289.95 MiB 414.84 MiB 2.26% 92.13% 13 ⚠️ PSS partial
Runtime and CDP session contracts — ✅ 26 contract cases; 0 failures
Suite Cases Failures Median case p50 Median case p95 Median peak PSS p50
Synthetic fetch 13 0 16.22 ms 17.01 ms 613.00 KiB
Long-lived CDP session 13 0 19.74 ms 20.62 ms
CDP smoke — ✅ 43/43 groups passed; 450 scenarios

Workers: 4 · cumulative group time: 140.20 s · failed groups: 0

Slowest group Scenarios Duration Status
chromium-cdp 56 16.96 s
multi-page 45 11.09 s
dom-input 26 10.79 s
core 35 10.09 s
layout-screenshot 5 7.82 s

All artifact fields are parsed by the trusted default-branch renderer; missing or invalid inputs remain visible as unavailable.

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.

1 participant