Skip to content

Conversation

Uzlopak
Copy link
Contributor

@Uzlopak Uzlopak commented Aug 28, 2025

sonarjs was reporting some imperformance in the regexes

This relates to...

Rationale

Changes

Features

Bug Fixes

Breaking Changes and Deprecations

Status

@Uzlopak Uzlopak requested a review from Copilot September 6, 2025 06:38
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

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 u flag 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 metcoder95 requested a review from tsctx September 7, 2025 08:47
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@7321451). Learn more about missing BASE report.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

4 participants