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

Improve patternDetection performance #877

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

marcustyphoon
Copy link

@marcustyphoon marcustyphoon commented Oct 2, 2022

Due to the large number of CSS selectors that are included in the patternDetection query, this extension can be fairly performance intensive on complex pages. However, as documented in the comments, many of the selectors are designed for a particular site, and thus don't need to be run on every site. This PR filters some of them out by filtering on window.location.hostname.

There may be cases where one site's login pattern selector coincidentally matches another site's login form, so there is some potential for loss of current functionality here, of course.

Edit: Oh, hey, an issue. Mostly resolves #544, but I do not know exactly which selectors need to be left, so I was much more conservative with the list than that issue suggests.

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