mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 12:21:58 +00:00
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:
parent
58002e270b
commit
d318238cd2
1 changed files with 1 additions and 2 deletions
|
|
@ -394,7 +394,7 @@ impl RulesCache {
|
||||||
"Cannot re-initialize a populated rules cache. It must be cleared first."
|
"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()
|
RULES.clone()
|
||||||
} else {
|
} else {
|
||||||
let mut plugins = self.plugins;
|
let mut plugins = self.plugins;
|
||||||
|
|
@ -410,7 +410,6 @@ impl RulesCache {
|
||||||
.cloned()
|
.cloned()
|
||||||
.collect()
|
.collect()
|
||||||
};
|
};
|
||||||
all_rules.sort_unstable(); // TODO: do we need to sort? is is already sorted?
|
|
||||||
|
|
||||||
*self.all_rules.borrow_mut() = Some(all_rules);
|
*self.all_rules.borrow_mut() = Some(all_rules);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue