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

refactor: reduce regex usage in getDomainFromOriginOrURL #241

Merged
merged 2 commits into from
Feb 6, 2025

Conversation

connorjclark
Copy link
Collaborator

Motivation: we're using this library inside Chrome DevTools performance view now, and getEntity is one of the top functions during loading a trace (since we call it on every trace event with a URL for aggregation).

I tried a couple other things, but ultimately the only thing that helped was not calling test followed by match. ~15% win on my machine. Added a (skipped) stress test for validation.

Copy link

vercel bot commented Feb 6, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
third-party-web ❌ Failed (Inspect) Feb 6, 2025 1:17am

Copy link
Owner

@patrickhulce patrickhulce left a comment

Choose a reason for hiding this comment

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

thanks! :)

@patrickhulce patrickhulce merged commit 021299a into patrickhulce:master Feb 6, 2025
5 of 6 checks passed
Copy link

github-actions bot commented Feb 6, 2025

🎉 This PR is included in version 0.26.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants