fix(connect): disable context takeover in websocket transport
The threshold option in perMessageDeflate is ignored due to context takeover being enabled. This leads to WebSocket RPC messages being unconditionally compressed.
Most RPC channel messages are small, and unconditionally performing message compression has measurable performance impact.
Disable context takeover (for both server and client) to let compression threshold option to take effect.
Fixes #33810
@microsoft-github-policy-service agree company="Theori"
Test results for "tests 1"
2 failed :x: [webkit-page] › page/page-leaks.spec.ts:82:5 › click should not leak @webkit-ubuntu-22.04-node18 :x: [webkit-page] › page/page-leaks.spec.ts:107:5 › fill should not leak @webkit-ubuntu-22.04-node18
2 flaky
:warning: [firefox-page] › page/page-goto.spec.ts:81:3 › should work with Cross-Origin-Opener-Policy @firefox-ubuntu-22.04-node18:warning: [playwright-test] › ui-mode-test-watch.spec.ts:145:5 › should watch all @windows-latest-node18-1
37187 passed, 650 skipped :heavy_check_mark::heavy_check_mark::heavy_check_mark:
Merge workflow run.
Test results for "tests others"
21270 passed, 509 skipped :heavy_check_mark::heavy_check_mark::heavy_check_mark:
Merge workflow run.
Test results for "tests 2"
1 fatal errors, not part of any test 13 failed :x: [chromium-library] › library/logger.spec.ts:19:3 › should log @smoke @chrome-beta-macos-latest :x: [chromium-library] › library/browsertype-connect.spec.ts:667:5 › run-server › should fulfill with global fetch result @chrome-macos-latest :x: [chromium-library] › library/inspector/cli-codegen-javascript.spec.ts:87:5 › should save the codegen output to a file if specified @chrome-macos-latest :x: [chromium-library] › library/inspector/cli-codegen-test.spec.ts:99:5 › should generate routeFromHAR with --save-har @chrome-macos-latest :x: [chromium-library] › library/inspector/cli-codegen-2.spec.ts:456:7 › cli codegen › should --save-trace @msedge-beta-macos-latest :x: [chromium-library] › library/inspector/cli-codegen-2.spec.ts:466:7 › cli codegen › should save assets via SIGINT @msedge-beta-macos-latest :x: [chromium-library] › library/inspector/cli-codegen-2.spec.ts:456:7 › cli codegen › should --save-trace @msedge-macos-latest :x: [webkit-library] › library/trace-viewer.spec.ts:1576:1 › should show a popover @webkit-macos-13-large :x: [webkit-library] › library/trace-viewer.spec.ts:1576:1 › should show a popover @webkit-macos-13-xlarge :x: [webkit-library] › library/tracing.spec.ts:432:14 › should produce screencast frames fit @webkit-macos-13-xlarge :x: [webkit-library] › library/browsertype-connect.spec.ts:735:5 › launchServer › setInputFiles should preserve lastModified timestamp @webkit-macos-14-large :x: [webkit-library] › library/browsertype-connect.spec.ts:735:5 › run-server › setInputFiles should preserve lastModified timestamp @webkit-macos-14-large :x: [webkit-page] › page/page-set-input-files.spec.ts:767:3 › should preserve lastModified timestamp @webkit-macos-14-large
102 flaky
:warning: [chromium-library] › library/beforeunload.spec.ts:20:3 › should close browser with beforeunload page @channel-chromium-macos-latest:warning: [chromium-library] › library/browsercontext-base-url.spec.ts:37:3 › should construct a new URL when a baseURL in browserType.launchPersistentContext is passed to page.goto @channel-chromium-macos-latest
:warning: [chromium-library] › library/browsercontext-fetch.spec.ts:1229:3 › should work with connectOverCDP @channel-chromium-macos-latest
:warning: [chromium-library] › library/browsercontext-proxy.spec.ts:27:3 › should work when passing the proxy only on the context level @channel-chromium-macos-latest
:warning: [chromium-library] › library/browsertype-connect.spec.ts:343:5 › run-server › should throw when calling waitForNavigation after disconnect @channel-chromium-macos-latest
:warning: [chromium-library] › library/har.spec.ts:82:3 › should have pages in persistent context @channel-chromium-macos-latest
:warning: [chromium-library] › library/inspector/cli-codegen-pick-locator.spec.ts:36:7 › should update locator highlight @channel-chromium-windows-latest
:warning: [chromium-library] › library/video.spec.ts:581:5 › screencast › should capture static page in persistent context @smoke @channel-chromium-windows-latest
:warning: [chromium-library] › library/fetch-proxy.spec.ts:21:3 › context request should pick up proxy credentials @chrome-beta-macos-latest
:warning: [chromium-library] › library/inspector/cli-codegen-javascript.spec.ts:87:5 › should save the codegen output to a file if specified @chrome-beta-macos-latest
:warning: [chromium-library] › library/inspector/cli-codegen-test.spec.ts:88:5 › should not generate recordHAR with --save-har @chrome-beta-macos-latest
:warning: [chromium-library] › library/inspector/pause.spec.ts:23:3 › should resume when closing inspector @chrome-beta-macos-latest
:warning: [chromium-library] › library/logger.spec.ts:34:3 › should log context-level @chrome-beta-macos-latest
:warning: [chromium-library] › library/video.spec.ts:381:5 › screencast › should capture navigation @chrome-beta-macos-latest
:warning: [chromium-library] › library/inspector/cli-codegen-pick-locator.spec.ts:36:7 › should update locator highlight @chrome-beta-windows-latest
:warning: [chromium-library] › library/trace-viewer.spec.ts:1465:1 › should show baseURL in metadata pane @chrome-beta-windows-latest
:warning: [chromium-library] › library/browser.spec.ts:54:5 › should dispatch page.on(close) upon browser.close and reject evaluate @chrome-macos-latest
:warning: [chromium-library] › library/browsercontext-proxy.spec.ts:27:3 › should work when passing the proxy only on the context level @chrome-macos-latest
:warning: [chromium-library] › library/inspector/cli-codegen-2.spec.ts:456:7 › cli codegen › should --save-trace @chrome-macos-latest
:warning: [chromium-library] › library/inspector/cli-codegen-pick-locator.spec.ts:36:7 › should update locator highlight @chrome-macos-latest
:warning: [chromium-library] › library/inspector/cli-codegen-pytest.spec.ts:57:5 › should save the codegen output to a file if specified @chrome-macos-latest
:warning: [chromium-library] › library/inspector/cli-codegen-python-async.spec.ts:82:5 › should save the codegen output to a file if specified @chrome-macos-latest
:warning: [chromium-library] › library/inspector/cli-codegen-test.spec.ts:88:5 › should not generate recordHAR with --save-har @chrome-macos-latest
:warning: [chromium-library] › library/inspector/pause.spec.ts:23:3 › should resume when closing inspector @chrome-macos-latest
:warning: [chromium-library] › library/selector-generator.spec.ts:407:5 › selector generator › should work with tricky attributes @chrome-windows-latest
:warning: [chromium-library] › library/trace-viewer.spec.ts:1474:1 › should not leak recorders @chromium-headed-ubuntu-24.04
:warning: [chromium-library] › library/inspector/cli-codegen-3.spec.ts:171:7 › cli codegen › should generate frame locators (4) @chromium-headed-windows-latest
:warning: [chromium-library] › library/global-fetch.spec.ts:341:3 › should json stringify string body when content-type is application/json @chromium-macos-14-xlarge
:warning: [chromium-page] › page/page-screenshot.spec.ts:650:5 › page screenshot animations › should stop animations that happen right before screenshot @chromium-macos-14-xlarge
:warning: [chromium-library] › library/trace-viewer.spec.ts:1221:1 › should pick locator in iframe @chromium-tip-of-tree-macos-13
:warning: [chromium-library] › library/video.spec.ts:381:5 › screencast › should capture navigation @chromium-tip-of-tree-macos-13--headed
:warning: [chromium-library] › library/video.spec.ts:381:5 › screencast › should capture navigation @chromium-tip-of-tree-ubuntu-20.04
:warning: [chromium-library] › library/inspector/pause.spec.ts:522:5 › pause › should record from debugger @chromium-tip-of-tree-ubuntu-20.04--headed
:warning: [chromium-library] › library/inspector/cli-codegen-1.spec.ts:24:7 › cli codegen › should click @chromium-tip-of-tree-windows-latest
:warning: [chromium-library] › library/inspector/cli-codegen-2.spec.ts:25:7 › cli codegen › should contain open page @chromium-tip-of-tree-windows-latest
:warning: [chromium-library] › library/inspector/cli-codegen-1.spec.ts:24:7 › cli codegen › should click @chromium-tip-of-tree-windows-latest--headed
:warning: [firefox-library] › library/headful.spec.ts:84:3 › should dispatch click events to oversized viewports @firefox-beta-macos-latest
:warning: [firefox-library] › library/capabilities.spec.ts:252:3 › requestFullscreen @firefox-headed-macos-14-xlarge
:warning: [firefox-library] › library/video.spec.ts:381:5 › screencast › should capture navigation @firefox-headed-macos-14-xlarge
:warning: [firefox-library] › library/browsercontext-basic.spec.ts:331:3 › should emulate media in cross-process iframe @firefox-headed-windows-latest
:warning: [firefox-library] › library/browsercontext-fetch.spec.ts:612:3 › should add default headers @firefox-headed-windows-latest
:warning: [firefox-library] › library/browsercontext-locale.spec.ts:118:3 › should be isolated between contexts @firefox-headed-windows-latest
:warning: [firefox-library] › library/inspector/cli-codegen-1.spec.ts:56:7 › cli codegen › should double click @firefox-headed-windows-latest
:warning: [firefox-library] › library/inspector/cli-codegen-3.spec.ts:146:7 › cli codegen › should generate frame locators (3) @firefox-headed-windows-latest
:warning: [firefox-library] › library/inspector/cli-codegen-3.spec.ts:411:7 › cli codegen › should generate role locators undef frame locators @firefox-headed-windows-latest
:warning: [firefox-library] › library/inspector/cli-codegen-3.spec.ts:616:7 › cli codegen › should consume contextmenu events, despite a custom context menu @firefox-headed-windows-latest
:warning: [firefox-library] › library/inspector/cli-codegen-aria.spec.ts:77:7 › should update aria snapshot highlight @firefox-headed-windows-latest
:warning: [firefox-library] › library/trace-viewer.spec.ts:924:1 › should follow redirects @firefox-headed-windows-latest
:warning: [firefox-library] › library/tracing.spec.ts:263:5 › should not include trace resources from the previous chunks @firefox-headed-windows-latest
:warning: [firefox-page] › page/page-click-timeout-4.spec.ts:20:3 › should timeout waiting for stable position @firefox-headed-windows-latest
:warning: [firefox-library] › library/video.spec.ts:381:5 › screencast › should capture navigation @firefox-macos-13-large
:warning: [chromium-library] › library/browsercontext-proxy.spec.ts:167:3 › should use proxy for second page @msedge-beta-macos-latest
:warning: [chromium-library] › library/browsercontext-reuse.spec.ts:30:1 › should re-add binding after reset @msedge-beta-macos-latest
:warning: [chromium-library] › library/browsercontext-reuse.spec.ts:50:1 › should reset serviceworker @msedge-beta-macos-latest
:warning: [chromium-library] › library/inspector/cli-codegen-test.spec.ts:88:5 › should not generate recordHAR with --save-har @msedge-beta-macos-latest
:warning: [chromium-library] › library/browsercontext-reuse.spec.ts:30:1 › should re-add binding after reset @msedge-beta-ubuntu-20.04
:warning: [chromium-library] › library/browsercontext-reuse.spec.ts:30:1 › should re-add binding after reset @msedge-beta-windows-latest
:warning: [chromium-library] › library/inspector/cli-codegen-1.spec.ts:24:7 › cli codegen › should click @msedge-beta-windows-latest
:warning: [chromium-library] › library/inspector/cli-codegen-2.spec.ts:25:7 › cli codegen › should contain open page @msedge-beta-windows-latest
:warning: [chromium-library] › library/inspector/cli-codegen-pick-locator.spec.ts:36:7 › should update locator highlight @msedge-beta-windows-latest
:warning: [chromium-library] › library/video.spec.ts:381:5 › screencast › should capture navigation @msedge-beta-windows-latest
:warning: [chromium-library] › library/browsercontext-base-url.spec.ts:37:3 › should construct a new URL when a baseURL in browserType.launchPersistentContext is passed to page.goto @msedge-dev-macos-latest
:warning: [chromium-library] › library/browsercontext-reuse.spec.ts:30:1 › should re-add binding after reset @msedge-dev-macos-latest
:warning: [chromium-library] › library/global-fetch.spec.ts:357:3 › should not double stringify array body when content-type is application/json @msedge-dev-macos-latest
:warning: [chromium-library] › library/inspector/cli-codegen-2.spec.ts:456:7 › cli codegen › should --save-trace @msedge-dev-macos-latest
:warning: [chromium-library] › library/inspector/cli-codegen-csharp.spec.ts:171:5 › should work with --save-har @msedge-dev-macos-latest
:warning: [chromium-library] › library/browsercontext-reuse.spec.ts:30:1 › should re-add binding after reset @msedge-dev-ubuntu-20.04
:warning: [chromium-library] › library/browser.spec.ts:54:5 › should dispatch page.on(close) upon browser.close and reject evaluate @msedge-macos-latest
:warning: [chromium-library] › library/browsercontext-base-url.spec.ts:37:3 › should construct a new URL when a baseURL in browserType.launchPersistentContext is passed to page.goto @msedge-macos-latest
:warning: [chromium-library] › library/browsercontext-fetch.spec.ts:1229:3 › should work with connectOverCDP @msedge-macos-latest
:warning: [chromium-library] › library/inspector/cli-codegen-test.spec.ts:88:5 › should not generate recordHAR with --save-har @msedge-macos-latest
:warning: [chromium-library] › library/logger.spec.ts:19:3 › should log @smoke @msedge-macos-latest
:warning: [chromium-library] › library/video.spec.ts:209:5 › screencast › should continue recording main page after popup closes @msedge-macos-latest
:warning: [chromium-library] › library/video.spec.ts:381:5 › screencast › should capture navigation @msedge-macos-latest
:warning: [chromium-library] › library/browsercontext-reuse.spec.ts:30:1 › should re-add binding after reset @msedge-ubuntu-20.04
:warning: [chromium-library] › library/browsercontext-reuse.spec.ts:30:1 › should re-add binding after reset @msedge-windows-latest
:warning: [webkit-library] › library/inspector/cli-codegen-1.spec.ts:611:7 › cli codegen › should select @webkit-headed-macos-14-xlarge
:warning: [webkit-library] › library/inspector/cli-codegen-1.spec.ts:382:7 › cli codegen › should press @webkit-headed-ubuntu-20.04
:warning: [webkit-library] › library/inspector/cli-codegen-2.spec.ts:313:7 › cli codegen › should record open in a new tab with url @webkit-headed-ubuntu-20.04
:warning: [webkit-library] › library/inspector/cli-codegen-1.spec.ts:238:7 › cli codegen › should not target selector preview by text regexp @webkit-headed-ubuntu-22.04
:warning: [webkit-library] › library/inspector/cli-codegen-1.spec.ts:867:7 › cli codegen › should click button with nested div @webkit-headed-ubuntu-22.04
:warning: [webkit-library] › library/inspector/cli-codegen-3.spec.ts:498:7 › cli codegen › should generate getByAltText @webkit-headed-ubuntu-22.04
:warning: [webkit-page] › page/page-click.spec.ts:261:3 › should click on checkbox input and toggle @webkit-headed-ubuntu-24.04
:warning: [webkit-library] › library/inspector/cli-codegen-1.spec.ts:200:7 › cli codegen › should work with TrustedTypes @webkit-headed-windows-latest
:warning: [webkit-library] › library/inspector/cli-codegen-1.spec.ts:579:7 › cli codegen › should uncheck @webkit-headed-windows-latest
:warning: [webkit-library] › library/inspector/cli-codegen-3.spec.ts:469:7 › cli codegen › should generate getByPlaceholder @webkit-headed-windows-latest
:warning: [webkit-library] › library/inspector/cli-codegen-3.spec.ts:779:7 › cli codegen › should assert visibility @webkit-headed-windows-latest
:warning: [webkit-library] › library/inspector/cli-codegen-pick-locator.spec.ts:36:7 › should update locator highlight @webkit-headed-windows-latest
:warning: [webkit-page] › page/page-click.spec.ts:261:3 › should click on checkbox input and toggle @webkit-headed-windows-latest
:warning: [webkit-library] › library/trace-viewer.spec.ts:1221:1 › should pick locator in iframe @webkit-macos-13-large
:warning: [webkit-page] › page/page-request-fallback.spec.ts:239:5 › post data › should amend binary post data @webkit-macos-13-large
:warning: [webkit-library] › library/tracing.spec.ts:432:14 › should produce screencast frames scale @webkit-macos-13-xlarge
:warning: [webkit-library] › library/tracing.spec.ts:432:14 › should produce screencast frames crop @webkit-macos-14-xlarge
:warning: [webkit-library] › library/tracing.spec.ts:432:14 › should produce screencast frames scale @webkit-macos-14-xlarge
:warning: [webkit-page] › page/wheel.spec.ts:101:3 › should dispatch wheel events after popup was opened @smoke @webkit-macos-15-large
:warning: [webkit-library] › library/tracing.spec.ts:432:14 › should produce screencast frames crop @webkit-macos-15-xlarge
:warning: [webkit-library] › library/tracing.spec.ts:432:14 › should produce screencast frames scale @webkit-macos-15-xlarge
:warning: [webkit-page] › page/page-request-continue.spec.ts:185:5 › post data › should amend post data @webkit-macos-15-xlarge
:warning: [webkit-library] › library/browsercontext-pages.spec.ts:82:3 › should click the button with offset with page scale @webkit-ubuntu-20.04
:warning: [webkit-library] › library/browsercontext-viewport-mobile.spec.ts:116:5 › mobile viewport › default mobile viewports to 980 width @webkit-ubuntu-20.04
:warning: [webkit-library] › library/screenshot.spec.ts:55:14 › page screenshot › should work with a mobile viewport and clip @webkit-ubuntu-20.04
:warning: [webkit-library] › library/browsercontext-reuse.spec.ts:50:1 › should reset serviceworker @webkit-windows-latest
254938 passed, 9906 skipped :heavy_check_mark::heavy_check_mark::heavy_check_mark:
Merge workflow run.
The change looks good to me. Is there an easy way to test that it does improve the performance and not regress it?
Would this work?
- Run two inline tests, once with connect() and once with launch(), each of which calls a certain API 10,000 times.
- Measure the execution time of both.
- Assert that the ratio of connect() test time to launch() test time is below certain threshold.
Also, should this go into tests/stress/?
(I looked into the test suite, and couldn't find anything related to performance regression test other than timeouts here and there.)
Test results for "tests 1"
3 flaky
:warning: [installation tests] › playwright-electron-should-work.spec.ts:44:5 › should work when wrapped inside @playwright/test and trace is enabled @package-installations-macos-latest:warning: [playwright-test] › ui-mode-test-ct.spec.ts:252:5 › should watch component when editing util @ubuntu-latest-node18-1
:warning: [playwright-test] › ui-mode-test-watch.spec.ts:145:5 › should watch all @windows-latest-node18-1
37194 passed, 650 skipped :heavy_check_mark::heavy_check_mark::heavy_check_mark:
Merge workflow run.
Test results for "tests others"
21272 passed, 509 skipped :heavy_check_mark::heavy_check_mark::heavy_check_mark:
Merge workflow run.
Test results for "tests 2"
1 fatal errors, not part of any test 12 failed :x: [chromium-library] › library/inspector/cli-codegen-test.spec.ts:99:5 › should generate routeFromHAR with --save-har @chrome-beta-macos-latest :x: [chromium-library] › library/logger.spec.ts:19:3 › should log @smoke @chrome-macos-latest :x: [chromium-library] › library/inspector/cli-codegen-2.spec.ts:466:7 › cli codegen › should save assets via SIGINT @msedge-beta-macos-latest :x: [chromium-library] › library/downloads-path.spec.ts:77:5 › downloads path › should report downloads in downloadsPath folder with a relative path @msedge-dev-macos-latest :x: [chromium-library] › library/downloads-path.spec.ts:91:5 › downloads path › should accept downloads in persistent context @msedge-dev-macos-latest :x: [chromium-library] › library/defaultbrowsercontext-1.spec.ts:22:3 › context.cookies() should work @smoke @msedge-dev-ubuntu-20.04 :x: [chromium-library] › library/defaultbrowsercontext-1.spec.ts:42:3 › context.addCookies() should work @msedge-dev-ubuntu-20.04 :x: [chromium-library] › library/inspector/cli-codegen-2.spec.ts:456:7 › cli codegen › should --save-trace @msedge-macos-latest :x: [webkit-library] › library/trace-viewer.spec.ts:1576:1 › should show a popover @webkit-macos-13-large :x: [webkit-library] › library/video.spec.ts:381:5 › screencast › should capture navigation @webkit-macos-13-large :x: [webkit-library] › library/trace-viewer.spec.ts:1576:1 › should show a popover @webkit-macos-13-xlarge :x: [webkit-library] › library/tracing.spec.ts:432:14 › should produce screencast frames crop @webkit-macos-13-xlarge
94 flaky
:warning: [chromium-library] › library/browsercontext-base-url.spec.ts:37:3 › should construct a new URL when a baseURL in browserType.launchPersistentContext is passed to page.goto @channel-chromium-macos-latest:warning: [chromium-library] › library/browsertype-launch-server.spec.ts:23:5 › launch server › should work @channel-chromium-macos-latest
:warning: [chromium-library] › library/video.spec.ts:381:5 › screencast › should capture navigation @channel-chromium-macos-latest
:warning: [chromium-library] › library/fetch-proxy.spec.ts:21:3 › context request should pick up proxy credentials @chrome-beta-macos-latest
:warning: [chromium-library] › library/inspector/cli-codegen-test.spec.ts:88:5 › should not generate recordHAR with --save-har @chrome-beta-macos-latest
:warning: [chromium-library] › library/logger.spec.ts:19:3 › should log @smoke @chrome-beta-macos-latest
:warning: [chromium-library] › library/browser.spec.ts:54:5 › should dispatch page.on(close) upon browser.close and reject evaluate @chrome-macos-latest
:warning: [chromium-library] › library/browsertype-connect.spec.ts:436:5 › run-server › should respect selectors @chrome-macos-latest
:warning: [chromium-library] › library/browsertype-connect.spec.ts:492:5 › run-server › should saveAs videos from remote browser @chrome-macos-latest
:warning: [chromium-library] › library/fetch-proxy.spec.ts:21:3 › context request should pick up proxy credentials @chrome-macos-latest
:warning: [chromium-library] › library/inspector/cli-codegen-2.spec.ts:456:7 › cli codegen › should --save-trace @chrome-macos-latest
:warning: [chromium-library] › library/inspector/cli-codegen-csharp.spec.ts:171:5 › should work with --save-har @chrome-macos-latest
:warning: [chromium-library] › library/video.spec.ts:381:5 › screencast › should capture navigation @chrome-windows-latest
:warning: [chromium-library] › library/browsercontext-fetch.spec.ts:1035:3 › should support multipart/form-data with ReadStream values @chromium-headed-macos-14-xlarge
:warning: [chromium-library] › library/trace-viewer.spec.ts:483:1 › should contain adopted style sheets @chromium-headed-windows-latest
:warning: [chromium-page] › page/page-drag.spec.ts:290:5 › Drag and drop › should work with the helper method @chromium-headed-windows-latest
:warning: [chromium-library] › library/trace-viewer.spec.ts:1221:1 › should pick locator in iframe @chromium-macos-13-large
:warning: [chromium-library] › library/inspector/cli-codegen-aria.spec.ts:77:7 › should update aria snapshot highlight @chromium-tip-of-tree-ubuntu-20.04--headed
:warning: [firefox-library] › library/tracing.spec.ts:432:14 › should produce screencast frames fit @firefox-beta-macos-latest
:warning: [firefox-library] › library/capabilities.spec.ts:252:3 › requestFullscreen @firefox-headed-macos-14-xlarge
:warning: [firefox-library] › library/video.spec.ts:381:5 › screencast › should capture navigation @firefox-headed-macos-14-xlarge
:warning: [firefox-library] › library/browsercontext-add-cookies.spec.ts:141:3 › should isolate persistent cookies @firefox-headed-windows-latest
:warning: [firefox-library] › library/browsercontext-locale.spec.ts:74:3 › should format number in popups @firefox-headed-windows-latest
:warning: [firefox-library] › library/browsercontext-locale.spec.ts:118:3 › should be isolated between contexts @firefox-headed-windows-latest
:warning: [firefox-library] › library/client-certificates.spec.ts:294:3 › browser › should fail with no client certificates @firefox-headed-windows-latest
:warning: [firefox-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used @firefox-headed-windows-latest
:warning: [firefox-library] › library/download.spec.ts:369:5 › download event › should delete downloads on context destruction @firefox-headed-windows-latest
:warning: [firefox-library] › library/hit-target.spec.ts:24:3 › should block all events when hit target is wrong @firefox-headed-windows-latest
:warning: [firefox-library] › library/hit-target.spec.ts:319:3 › should detect overlay from another shadow root @firefox-headed-windows-latest
:warning: [firefox-library] › library/inspector/cli-codegen-3.spec.ts:315:7 › cli codegen › should generate frame locators with name attribute @firefox-headed-windows-latest
:warning: [firefox-library] › library/inspector/cli-codegen-3.spec.ts:347:7 › cli codegen › should generate frame locators with id attribute @firefox-headed-windows-latest
:warning: [firefox-library] › library/inspector/pause.spec.ts:294:5 › pause › should highlight waitForEvent @firefox-headed-windows-latest
:warning: [firefox-page] › page/page-add-locator-handler.spec.ts:260:5 › should work with times: option @firefox-headed-windows-latest
:warning: [firefox-library] › library/tracing.spec.ts:432:14 › should produce screencast frames fit @firefox-macos-13-xlarge
:warning: [firefox-library] › library/inspector/cli-codegen-pick-locator.spec.ts:36:7 › should update locator highlight @firefox-macos-14-xlarge
:warning: [chromium-library] › library/beforeunload.spec.ts:20:3 › should close browser with beforeunload page @msedge-beta-macos-latest
:warning: [chromium-library] › library/browser.spec.ts:54:5 › should dispatch page.on(close) upon browser.close and reject evaluate @msedge-beta-macos-latest
:warning: [chromium-library] › library/browsercontext-base-url.spec.ts:37:3 › should construct a new URL when a baseURL in browserType.launchPersistentContext is passed to page.goto @msedge-beta-macos-latest
:warning: [chromium-library] › library/browsercontext-fetch.spec.ts:1229:3 › should work with connectOverCDP @msedge-beta-macos-latest
:warning: [chromium-library] › library/browsercontext-proxy.spec.ts:27:3 › should work when passing the proxy only on the context level @msedge-beta-macos-latest
:warning: [chromium-library] › library/global-fetch-cookie.spec.ts:171:1 › should remove cookie with negative max-age @msedge-beta-macos-latest
:warning: [chromium-library] › library/inspector/cli-codegen-2.spec.ts:456:7 › cli codegen › should --save-trace @msedge-beta-macos-latest
:warning: [chromium-library] › library/inspector/cli-codegen-csharp.spec.ts:171:5 › should work with --save-har @msedge-beta-macos-latest
:warning: [chromium-library] › library/inspector/cli-codegen-test.spec.ts:88:5 › should not generate recordHAR with --save-har @msedge-beta-macos-latest
:warning: [chromium-library] › library/popup.spec.ts:264:3 › should not throw when click closes popup @msedge-beta-macos-latest
:warning: [chromium-library] › library/proxy.spec.ts:93:11 › should proxy local network requests › by default › link-local @msedge-beta-macos-latest
:warning: [chromium-library] › library/browsercontext-reuse.spec.ts:30:1 › should re-add binding after reset @msedge-beta-ubuntu-20.04
:warning: [chromium-library] › library/browsercontext-proxy.spec.ts:294:3 › should exclude patterns @msedge-beta-windows-latest
:warning: [chromium-library] › library/browsercontext-reuse.spec.ts:30:1 › should re-add binding after reset @msedge-beta-windows-latest
:warning: [chromium-library] › library/beforeunload.spec.ts:20:3 › should close browser with beforeunload page @msedge-dev-macos-latest
:warning: [chromium-library] › library/browser.spec.ts:54:5 › should dispatch page.on(close) upon browser.close and reject evaluate @msedge-dev-macos-latest
:warning: [chromium-library] › library/browsercontext-reuse.spec.ts:30:1 › should re-add binding after reset @msedge-dev-macos-latest
:warning: [chromium-library] › library/browsertype-launch-server.spec.ts:84:5 › launch server › should return child_process instance @msedge-dev-macos-latest
:warning: [chromium-library] › library/defaultbrowsercontext-1.spec.ts:22:3 › context.cookies() should work @smoke @msedge-dev-macos-latest
:warning: [chromium-library] › library/downloads-path.spec.ts:105:5 › downloads path › should delete downloads when persistent context closes @msedge-dev-macos-latest
:warning: [chromium-library] › library/inspector/cli-codegen-2.spec.ts:456:7 › cli codegen › should --save-trace @msedge-dev-macos-latest
:warning: [chromium-library] › library/browsercontext-reuse.spec.ts:30:1 › should re-add binding after reset @msedge-dev-ubuntu-20.04
:warning: [chromium-library] › library/browsercontext-reuse.spec.ts:30:1 › should re-add binding after reset @msedge-dev-windows-latest
:warning: [chromium-library] › library/beforeunload.spec.ts:20:3 › should close browser with beforeunload page @msedge-macos-latest
:warning: [chromium-library] › library/browser.spec.ts:54:5 › should dispatch page.on(close) upon browser.close and reject evaluate @msedge-macos-latest
:warning: [chromium-library] › library/browsercontext-fetch.spec.ts:1229:3 › should work with connectOverCDP @msedge-macos-latest
:warning: [chromium-library] › library/browsercontext-reuse.spec.ts:30:1 › should re-add binding after reset @msedge-macos-latest
:warning: [chromium-library] › library/browsertype-connect.spec.ts:198:5 › launchServer › should be able to connect two browsers at the same time @msedge-macos-latest
:warning: [chromium-library] › library/browsertype-launch.spec.ts:115:3 › should fire close event for all contexts @msedge-macos-latest
:warning: [chromium-library] › library/inspector/cli-codegen-csharp.spec.ts:171:5 › should work with --save-har @msedge-macos-latest
:warning: [chromium-library] › library/inspector/cli-codegen-test.spec.ts:88:5 › should not generate recordHAR with --save-har @msedge-macos-latest
:warning: [chromium-library] › library/inspector/cli-codegen-test.spec.ts:99:5 › should generate routeFromHAR with --save-har @msedge-macos-latest
:warning: [chromium-library] › library/proxy.spec.ts:291:3 › should use SOCKS proxy for websocket requests @msedge-macos-latest
:warning: [chromium-library] › library/browsercontext-reuse.spec.ts:30:1 › should re-add binding after reset @msedge-ubuntu-20.04
:warning: [chromium-library] › library/defaultbrowsercontext-1.spec.ts:22:3 › context.cookies() should work @smoke @msedge-ubuntu-20.04
:warning: [webkit-library] › library/screenshot.spec.ts:55:14 › page screenshot › should work with a mobile viewport and clip @tracing-webkit
:warning: [webkit-library] › library/inspector/cli-codegen-1.spec.ts:611:7 › cli codegen › should select @webkit-headed-macos-14-xlarge
:warning: [webkit-library] › library/inspector/cli-codegen-1.spec.ts:333:7 › cli codegen › should fill textarea @webkit-headed-ubuntu-20.04
:warning: [webkit-library] › library/inspector/cli-codegen-1.spec.ts:382:7 › cli codegen › should press @webkit-headed-ubuntu-20.04
:warning: [webkit-library] › library/inspector/cli-codegen-1.spec.ts:365:7 › cli codegen › should fill [contentEditable] @webkit-headed-ubuntu-22.04
:warning: [webkit-library] › library/browsercontext-reuse.spec.ts:206:1 › should reset mouse position @webkit-headed-windows-latest
:warning: [webkit-library] › library/inspector/cli-codegen-1.spec.ts:930:7 › cli codegen › should clear when recording is disabled @webkit-headed-windows-latest
:warning: [webkit-library] › library/inspector/cli-codegen-2.spec.ts:313:7 › cli codegen › should record open in a new tab with url @webkit-headed-windows-latest
:warning: [webkit-library] › library/inspector/cli-codegen-3.spec.ts:469:7 › cli codegen › should generate getByPlaceholder @webkit-headed-windows-latest
:warning: [webkit-library] › library/inspector/cli-codegen-3.spec.ts:686:7 › cli codegen › should assert value @webkit-headed-windows-latest
:warning: [webkit-library] › library/inspector/cli-codegen-pick-locator.spec.ts:36:7 › should update locator highlight @webkit-headed-windows-latest
:warning: [webkit-page] › page/page-mouse.spec.ts:244:3 › should tween mouse movement @webkit-headed-windows-latest
:warning: [webkit-library] › library/trace-viewer.spec.ts:1221:1 › should pick locator in iframe @webkit-macos-13-large
:warning: [webkit-page] › page/page-request-fallback.spec.ts:239:5 › post data › should amend binary post data @webkit-macos-13-large
:warning: [webkit-library] › library/browsertype-connect.spec.ts:575:5 › run-server › should properly disconnect when connection closes from the client side @webkit-macos-13-xlarge
:warning: [webkit-library] › library/tracing.spec.ts:432:14 › should produce screencast frames fit @webkit-macos-13-xlarge
:warning: [webkit-library] › library/tracing.spec.ts:432:14 › should produce screencast frames scale @webkit-macos-13-xlarge
:warning: [webkit-library] › library/trace-viewer.spec.ts:1524:1 › canvas clipping @webkit-macos-14-xlarge
:warning: [webkit-page] › page/page-request-fallback.spec.ts:239:5 › post data › should amend binary post data @webkit-macos-15-large
:warning: [webkit-library] › library/trace-viewer.spec.ts:1524:1 › canvas clipping @webkit-macos-15-xlarge
:warning: [webkit-library] › library/browsercontext-reuse.spec.ts:50:1 › should reset serviceworker @webkit-ubuntu-20.04
:warning: [webkit-library] › library/screenshot.spec.ts:66:14 › page screenshot › should work with a mobile viewport and fullPage @webkit-ubuntu-20.04
:warning: [webkit-library] › library/browsercontext-reuse.spec.ts:50:1 › should reset serviceworker @webkit-windows-latest
:warning: [webkit-library] › library/inspector/cli-codegen-pick-locator.spec.ts:36:7 › should update locator highlight @webkit-windows-latest
247235 passed, 9671 skipped :heavy_check_mark::heavy_check_mark::heavy_check_mark:
Merge workflow run.
FWIW, here's a simple test you can run against https://github.com/microsoft/playwright/tree/main and https://github.com/jinohkang-theori/playwright/tree/fix/connect/no-context-takeover:
const playwright = require("playwright");
async function main() {
const n = 10000;
const server = await playwright.chromium.launchServer({ headless: true });
const browser = await playwright.chromium.connect(server.wsEndpoint());
const page = await browser.newPage();
const startTs = performance.now();
for (let i = 0; i < n; i++) {
await page.title();
}
const endTs = performance.now();
console.log(`mean call time: ${(endTs - startTs) / n}ms`);
await page.close();
await browser.close();
await server.close();
}
main().catch(console.error);
I've added the following test next to https://github.com/microsoft/playwright/blob/d029b03d9fc7d65329b47e08b9690b237bee30b7/tests/library/browsertype-connect.spec.ts#L161 and I see very little improvement and if I added heavier calls to the loop such as page.goto() it becomes indistinguishable.
test('short message compression', async ({ connect, startRemoteServer }) => {
const remoteServer = await startRemoteServer(kind);
const browser = await connect(remoteServer.wsEndpoint());
const n = 1000;
const page = await browser.newPage();
await page.goto('https://playwright.dev/');
const startTs = performance.now();
for (let i = 0; i < n; i++) {
await page.title();
}
const endTs = performance.now();
console.log(`mean call time: ${(endTs - startTs)}ms`);
await page.close();
await browser.close();
});
and I see very little improvement
Thanks for sharing! I find it interesting since this PR resulted in 2x-3x perf improvement for me. Maybe something to do with DEFLATE implementation on my platform?
and if I added heavier calls to the loop such as page.goto() it becomes indistinguishable.
Right, this is expected.