Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Precalculate the browser version information to prevent I/O calls #1359

Closed
3 tasks done
Tracked by #428
inancgumus opened this issue May 30, 2024 · 0 comments
Closed
3 tasks done
Tracked by #428

Precalculate the browser version information to prevent I/O calls #1359

inancgumus opened this issue May 30, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@inancgumus
Copy link
Member

inancgumus commented May 30, 2024

What

Precalculate the browser version.

Why

  • To prevent I/O calls when the version and userAgent methods are called.
  • To keep the API consistent with PW. Otherwise, we'd need to turn the methods into async since they make an I/O call.

How

  • Turn panics into errors first
  • Remove the cdpbrowser.GetVersion call from Browser.Version() and Browser.UserAgent
  • Send the cdpbrowser.GetVersion call in NewBrowser and save the version

Tasks

  1. refactor stability
    inancgumus
  2. inancgumus

Issue: #1307

@inancgumus inancgumus added async supports async (promises) bug Something isn't working playwright Issue relating to Playwright compatibility compatibility k6 core compatibility enhancement New feature or request and removed bug Something isn't working async supports async (promises) compatibility k6 core compatibility labels May 30, 2024
@inancgumus inancgumus changed the title Convert back browser.version to sync Precalculate browser.version to prevent the I/O call May 30, 2024
@inancgumus inancgumus removed the playwright Issue relating to Playwright compatibility label May 30, 2024
@inancgumus inancgumus changed the title Precalculate browser.version to prevent the I/O call Precalculate browser.version and browser.userAgent to prevent the I/O call May 30, 2024
@inancgumus inancgumus self-assigned this May 30, 2024
@inancgumus inancgumus changed the title Precalculate browser.version and browser.userAgent to prevent the I/O call Precalculate the browser version information to prevent I/O calls May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant