Skip to content

fix(@wdio/browser-runner): sanitize objects to reduce performance burden when stringifying#12979

Merged
christian-bromann merged 2 commits intomainfrom
cb/component-test-performance-fix
Jun 5, 2024
Merged

fix(@wdio/browser-runner): sanitize objects to reduce performance burden when stringifying#12979
christian-bromann merged 2 commits intomainfrom
cb/component-test-performance-fix

Conversation

@christian-bromann
Copy link
Copy Markdown
Member

@christian-bromann christian-bromann commented Jun 4, 2024

Proposed changes

This patch fixes a performance issue we've discovered in the Eslint project. It turns out that we haven't been filtering for large test context objects in the hook wrapper causing performance issues when using hooks in component tests.

Types of changes

  • Polish (an improvement for an existing feature)
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update (improvements to the project's docs)
  • Specification changes (updates to WebDriver command specifications)
  • Internal updates (everything related to internal scripts, governance documentation and CI files)

Checklist

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have added the necessary documentation (if appropriate)
  • I have added proper type definitions for new commands (if appropriate)

Backport Request

//: # (The current main branch is the development branch for WebdriverIO v9. If your change should be released to the current major version of WebdriverIO (v8), please raise another PR with the same changes against the v8 branch.)

  • This change is solely for v9 and doesn't need to be back-ported
  • Back-ported PR at #12980

Further comments

I tested this on the current Eslint codebase and verified it works. Next step for us should it be to integrate Eslint into our pipeline to avoid these issues from trickling down.

Reviewers: @webdriverio/project-committers

@christian-bromann christian-bromann added the PR: Bug Fix 🐛 PRs that contain bug fixes label Jun 4, 2024
@christian-bromann christian-bromann force-pushed the cb/component-test-performance-fix branch 3 times, most recently from 79df5c4 to 70e8f91 Compare June 5, 2024 00:54
@christian-bromann christian-bromann force-pushed the cb/component-test-performance-fix branch from 70e8f91 to 37d548e Compare June 5, 2024 00:57
@christian-bromann christian-bromann merged commit f3267b8 into main Jun 5, 2024
@christian-bromann christian-bromann deleted the cb/component-test-performance-fix branch June 5, 2024 03:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: Bug Fix 🐛 PRs that contain bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant