Conversation
Uzlopak
commented
Aug 30, 2025
tsctx
reviewed
Aug 31, 2025
Co-authored-by: tsctx <91457664+tsctx@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR improves regex patterns in the data-url.js file to address performance issues identified by SonarJS. The changes focus on optimizing regex patterns and refactoring a for loop to a while loop.
- Adds the
uflag to regex patterns for better Unicode handling and performance - Optimizes character class ordering and grouping in regex patterns
- Refactors a for loop to a while loop in the percentDecode function
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
metcoder95
approved these changes
Sep 26, 2025
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4483 +/- ##
=======================================
Coverage ? 92.94%
=======================================
Files ? 106
Lines ? 32976
Branches ? 0
=======================================
Hits ? 30649
Misses ? 2327
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Merged
slagiewka
pushed a commit
to slagiewka/undici
that referenced
this pull request
Feb 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
sonarjs was reporting some imperformance in the regexes
This relates to...
Rationale
Changes
Features
Bug Fixes
Breaking Changes and Deprecations
Status