perf(linter): Remove sorting of rules in cache (#8718)

Experimentally removing this sort as the TODO indicated this might not be needed. If there's no performance loss, I'd say we should merge it.
This commit is contained in:
camchenry 2025-01-25 17:06:53 +00:00
parent 58002e270b
commit d318238cd2

View file

@ -394,7 +394,7 @@ impl RulesCache {
"Cannot re-initialize a populated rules cache. It must be cleared first."
);
let mut all_rules: Vec<_> = if self.plugins.is_all() {
let all_rules: Vec<_> = if self.plugins.is_all() {
RULES.clone()
} else {
let mut plugins = self.plugins;
@ -410,7 +410,6 @@ impl RulesCache {
.cloned()
.collect()
};
all_rules.sort_unstable(); // TODO: do we need to sort? is is already sorted?
*self.all_rules.borrow_mut() = Some(all_rules);
}