Skip to content
This repository has been archived by the owner on Jun 23, 2020. It is now read-only.

Commit

Permalink
Parallelize fetch requests when loading project from template
Browse files Browse the repository at this point in the history
See #145 for context
  • Loading branch information
vgrichina committed Aug 27, 2019
1 parent 0d69b0d commit 3ab9645
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ export class Service {
}

static async loadFilesIntoProject(files: IFiddleFile[], project: Project, base: URL = null): Promise<any> {
for (const f of files) {
await Promise.all(files.map(async f => {
const type = fileTypeFromFileName(f.name);
const file = project.newFile(f.name, type, false);
let data: string | ArrayBuffer;
Expand All @@ -498,7 +498,7 @@ export class Service {
}
}
file.setData(data);
}
}));
}

static lazyLoad(uri: string, status?: IStatusProvider): Promise<any> {
Expand Down

0 comments on commit 3ab9645

Please sign in to comment.