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

perf: unify tldts #596

Merged
merged 1 commit into from Nov 11, 2022
Merged

perf: unify tldts #596

merged 1 commit into from Nov 11, 2022

Conversation

Kikobeats
Copy link
Member

@Kikobeats Kikobeats commented Nov 11, 2022

The goal is to avoid reparse values already computed previously.

This PR unifies tldts inside metascraper helper, wrapped by lodash.memoize.

A little benchmark performed inside tests:

  • first method call: 0.30225ms
  • successive calls: 0.016458ms

@coveralls
Copy link
Collaborator

Coverage Status

Coverage increased (+0.002%) to 98.286% when pulling 43422a9 on tldts into 24f318a on master.

@Kikobeats Kikobeats merged commit 00a0633 into master Nov 11, 2022
@Kikobeats Kikobeats deleted the tldts branch November 11, 2022 22:59
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.

None yet

2 participants