Skip to content

Comments

Improve patternDetection performance#877

Open
marcustyphoon wants to merge 6 commits intomozilla:mainfrom
marcustyphoon:selector-performance
Open

Improve patternDetection performance#877
marcustyphoon wants to merge 6 commits intomozilla:mainfrom
marcustyphoon:selector-performance

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

Development

Successfully merging this pull request may close these issues.

content_script.js blocks the main thread of the content process scanning the entire document for elements that, for most pages, aren't there

1 participant