Skip to content

Reduce progress-only WebKit page-record churn - #11

Open
duggal1 wants to merge 2 commits into
mainfrom
perf/reduce-webkit-state-churn-20260924
Open

duggal1 wants to merge 2 commits into
mainfrom
perf/reduce-webkit-state-churn-20260924

Conversation

@duggal1

@duggal1 duggal1 commented Sep 24, 2026 •

Copy link
Copy Markdown
Owner

Scope

Avoid rewriting page metadata and refreshing page activity timestamps on every WebKit progress-only update. Preserve per-page observer progress delivery, navigation-state changes, history and viewport updates, and stale sequence rejection. Add regression coverage.

Evidence / limitations

This removes a demonstrably redundant runtime write; no measured FCP improvement is claimed. The raw-WebKit-vs-Blink differences reported by the existing benchmarks remain outside this change.

Validation requested

Run native Swift build and AgentTests on a suitable macOS 27 SDK runner and the headed Aether application benchmark before merging. This environment cannot execute the native macOS application.

Summary by CodeRabbit

  • Bug Fixes
    • Web page loading progress now stays accurate when updates arrive out of order.
    • Progress-only updates no longer incorrectly refresh a page’s last-active time.

@coderabbitai

coderabbitai Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Free

Run ID: 265ce854-ceb8-4986-a0b8-52767e073834

📥 Commits

Reviewing files that changed from the base of the PR and between c8b6729 and 7c9c7f1.

📒 Files selected for processing (2)
  • Sources/EngineRuntime/WebKit/SystemWebRuntime.swift
  • Tests/AgentTests/WebKitPerformanceTests.swift

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The runtime now avoids updating a page record and its last-active timestamp when incoming state changes only in progress. Tests verify that progress updates preserve the timestamp and that stale progress does not replace the observed value.

Changes

WebKit progress update handling

Layer / File(s) Summary
Detect tracked changes and verify progress updates
Sources/EngineRuntime/WebKit/SystemWebRuntime.swift, Tests/AgentTests/WebKitPerformanceTests.swift
The runtime checks viewport, URL, loading, content readiness, error, and nonempty history changes before updating the page record. When none change, it publishes page state and returns without updating the record or its last-active timestamp. Tests verify that progress-only updates preserve the timestamp and stale progress does not replace the observed value.

Estimated code review effort: 2 (Simple) | ~10 minutes


Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Essentials by visiting https://app.coderabbit.ai/settings/billing.

Comment @coderabbitai help to get the list of available commands.

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