Skip to content
This repository has been archived by the owner on Nov 6, 2023. It is now read-only.

Use ES6 generator functions to reduce run-time overhead in search & lookup #16951

Closed
wants to merge 2 commits into from
Closed

Use ES6 generator functions to reduce run-time overhead in search & lookup #16951

wants to merge 2 commits into from

Conversation

cschanaj
Copy link
Collaborator

@cschanaj cschanaj commented Oct 21, 2018

This will make potentiallyApplicableRulesets() an ES6 generator function and save us some run-time overhead in the searching of rulesets. As a trade-off, we can no longer cache all search results and see an extensive logging.

Remark: Travis is not triggered for this PR #16950

@cschanaj
Copy link
Collaborator Author

It seems that we cannot further optimize the use of potentiallyApplicableRulesets without breaking change in the UI...

for (let ruleset of potentiallyApplicable) {
if (details.url.match(ruleset.scope)) {
appliedRulesets.addRulesetToTab(details.tabId, details.type, ruleset);
if (ruleset.active && !newuristr) {
newuristr = ruleset.apply(uri.href);
}
}
}

@cschanaj cschanaj changed the title Use ES6 Generator in potentiallyApplicableRulesets Use ES6 generator functions to reduce run-time overhead in search & lookup Oct 21, 2018
@cschanaj cschanaj closed this Oct 24, 2018
@cschanaj cschanaj reopened this Oct 24, 2018
@cschanaj cschanaj closed this Oct 25, 2018
@cschanaj cschanaj deleted the es6-generator branch October 25, 2018 01:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant