Skip to content

fix(protocol): skip absent optional fields during validation - #3368

Draft
microsoft-playwright-automation[bot] wants to merge 1 commit into
mainfrom
triage/3362/45159106058-1
Draft

microsoft-playwright-automation[bot] wants to merge 1 commit into
mainfrom
triage/3362/45159106058-1

Conversation

@microsoft-playwright-automation

Copy link
Copy Markdown
Contributor
  • Mark optional validators and cache object schema entries once. Skip absent optional fields before building their paths or calling their validators.
  • Keep validation of required and present fields, including explicit None values and array nulls.

A new sync Python-only test is needed because no existing sync test covers validation of sparse evaluation results. It checks unnecessary calls directly, without a timing threshold.

With the same client and Chromium driver, the benchmark fell from 3.339 s to 2.586 s. The regression fails before the fix and passes on all three browsers. Sync and async evaluation tests and storage-state coverage passed; mypy playwright and scripts/lint.sh passed.

Fixes #3362

Triaged on macOS by the Playwright bot - agent run

This branch has not been deployed

No deployments
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.

[Regression]: evaluate() with larger results ~40% slower since 1.65

0 participants