Skip to content

Commit 876c078

Browse files
yangdanny97meta-codesync[bot]
authored andcommitted
don't run transaction in a loop
Summary: IDK why we're doing this in a loop 4x speedup memory usage is still horrendous Reviewed By: rchen152 Differential Revision: D91722650 fbshipit-source-id: 47a91d8aeed03a6ab3eaaf9480a3796edda634b0
1 parent dfecc04 commit 876c078

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

pyrefly/lib/commands/report.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -469,10 +469,8 @@ impl ReportArgs {
469469
}
470470

471471
let mut report: HashMap<String, FileReport> = HashMap::new();
472-
472+
transaction.run(handles.as_slice(), Require::Everything);
473473
for handle in handles {
474-
transaction.run(&[handle.dupe()], Require::Everything);
475-
476474
if let Some(bindings) = transaction.get_bindings(&handle)
477475
&& let Some(module) = transaction.get_module_info(&handle)
478476
&& let Some(answers) = transaction.get_answers(&handle)

0 commit comments

Comments
 (0)