Skip to content

Commit 851cbca

Browse files
committed
missing code to speed up
1 parent 7dff290 commit 851cbca

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/dfx/src/lib/builders/motoko.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ fn get_imports(cache: &dyn Cache, info: &MotokoCanisterInfo, imports: &mut Impor
6666
let import = MotokoImport::try_from(line).context("Failed to create MotokoImport.")?;
6767
match import {
6868
MotokoImport::Relative(path) => {
69-
get_imports_recursive(cache, path.as_path(), imports)?;
69+
if !imports.nodes.contains_key(&import) { // Don't look up already looked up dependencies
70+
get_imports_recursive(cache, path.as_path(), imports)?;
71+
}
7072
}
7173
_ => {
7274
let parent = MotokoImport::Relative(file.to_path_buf());

0 commit comments

Comments
 (0)