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 browser.version and browser.userAgent to prevent the I/O call #1361

Merged
merged 6 commits into from
May 30, 2024

Conversation

inancgumus
Copy link
Member

@inancgumus inancgumus commented May 30, 2024

What?

  • Precalculates the browser version information after connecting to the browser.
  • Removes error from the Version and UserAgent methods as the version information is cached.
  • Downside: The browser version information is always fetched to cache it.

Checklist

  • I have performed a self-review of my code
  • I have added tests for my changes
  • I have commented on my code, particularly in hard-to-understand areas

Related PR(s)/Issue(s)

#1359

@inancgumus inancgumus self-assigned this May 30, 2024
@inancgumus inancgumus requested a review from ankur22 May 30, 2024 13:20
@inancgumus inancgumus marked this pull request as ready for review May 30, 2024 13:20
Base automatically changed from refactor/browser-panic-to-err to main May 30, 2024 13:22
Copy link
Collaborator

@ankur22 ankur22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Thanks for the quick turnaround on this. LGTM

@inancgumus inancgumus merged commit d3db2c4 into main May 30, 2024
17 checks passed
@inancgumus inancgumus deleted the feat/nonio-browser-version branch May 30, 2024 13:49
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.

None yet

2 participants