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

avoid calling getDomainFromOriginOrURL twice per getEntity #243

Merged
merged 3 commits into from
Feb 7, 2025

Conversation

paulirish
Copy link
Collaborator

another 25% speedup on top of #241

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.

sweet! thank you kindly @paulirish :)

if (!domain) return [null, null]
if (IP_REGEX.test(domain)) return [domain, domain]
m = domain.match(ROOT_DOMAIN_REGEX)
const rootDomain = m && m[0] || domain;
Copy link
Owner

Choose a reason for hiding this comment

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

a little nervous that this passed the linter 😆

@patrickhulce patrickhulce merged commit 94bf500 into patrickhulce:master Feb 7, 2025
5 checks passed
Copy link

github-actions bot commented Feb 7, 2025

🎉 This PR is included in version 0.26.5 🎉

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