Skip to content

Commit d318238

Browse files
committedJan 25, 2025·
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.
1 parent 58002e2 commit d318238

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed
 

Diff for: ‎crates/oxc_linter/src/config/config_builder.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ impl RulesCache {
394394
"Cannot re-initialize a populated rules cache. It must be cleared first."
395395
);
396396

397-
let mut all_rules: Vec<_> = if self.plugins.is_all() {
397+
let all_rules: Vec<_> = if self.plugins.is_all() {
398398
RULES.clone()
399399
} else {
400400
let mut plugins = self.plugins;
@@ -410,7 +410,6 @@ impl RulesCache {
410410
.cloned()
411411
.collect()
412412
};
413-
all_rules.sort_unstable(); // TODO: do we need to sort? is is already sorted?
414413

415414
*self.all_rules.borrow_mut() = Some(all_rules);
416415
}

0 commit comments

Comments
 (0)
Please sign in to comment.