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

feat(selectors): speed up text selector #5387

Merged
merged 1 commit into from
Feb 10, 2021
Merged

feat(selectors): speed up text selector #5387

merged 1 commit into from
Feb 10, 2021

Conversation

dgozman
Copy link
Contributor

@dgozman dgozman commented Feb 9, 2021

  • Do not check children when parent does not contain the text we look for.
  • Minor caching improvements in evaluator.

This gives up to 5X performance boost on text-heavy pages.

src/server/injected/selectorEvaluator.ts Outdated Show resolved Hide resolved
src/server/injected/injectedScript.ts Outdated Show resolved Hide resolved
src/server/injected/injectedScript.ts Show resolved Hide resolved
- Do not check children when parent does not contain the text we look for.
- Minor caching improvements in evaluator.

This gives up to 5X performance boost on text-heavy pages.
@dgozman dgozman merged commit 6a98241 into microsoft:master Feb 10, 2021
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