Skip to content

Use Set-based URL dedupe checks in crawlDomain#672

Open
WilsonkwSheng wants to merge 1 commit intomasterfrom
refactor-crawler-url-lookup
Open

Use Set-based URL dedupe checks in crawlDomain#672
WilsonkwSheng wants to merge 1 commit intomasterfrom
refactor-crawler-url-lookup

Conversation

@WilsonkwSheng
Copy link
Collaborator

Swapped repeated array .some(...) URL dedupe checks in crawlDomain to Set.has(...) for O(1) lookups.
Behavior is unchanged because the sets are initialized from urlsCrawled.scanned and kept in sync on every new scanned entry.

This improves crawler performance on larger runs by reducing hot-path membership check cost.

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.

1 participant