mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 04:08:41 +00:00
perf(linter): reuse allocator when there are multiple source texts (#6337)
This commit is contained in:
parent
9e9808b429
commit
ac0a82af71
1 changed files with 5 additions and 2 deletions
|
|
@ -271,8 +271,11 @@ impl Runtime {
|
|||
// source code after each fix.
|
||||
let mut fix_offset: i32 = 0;
|
||||
|
||||
for source in sources {
|
||||
let allocator = Allocator::default();
|
||||
let mut allocator = Allocator::default();
|
||||
for (i, source) in sources.into_iter().enumerate() {
|
||||
if i >= 1 {
|
||||
allocator.reset();
|
||||
}
|
||||
let mut messages = self.process_source(
|
||||
path,
|
||||
&allocator,
|
||||
|
|
|
|||
Loading…
Reference in a new issue