Skip to content

Commit 6514e77

Browse files
committed
Don't prepare platform N times if N files have been changed.
Move platform preparation out of beforeBatchLiveSyncAction and call it once before processing changed files.
1 parent c9b9d3d commit 6514e77

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/services/usb-livesync-service.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ export class UsbLiveSyncService extends usbLivesyncServiceBaseLib.UsbLiveSyncSer
7878

7979
let beforeBatchLiveSyncAction = (filePath: string): IFuture<string> => {
8080
return (() => {
81-
this.$platformService.preparePlatform(platform).wait();
8281
let projectFileInfo = this.getProjectFileInfo(filePath);
8382
return path.join(projectFilesPath, path.relative(path.join(this.$projectData.projectDir, constants.APP_FOLDER_NAME), projectFileInfo.onDeviceName));
8483
}).future<string>()();
@@ -113,6 +112,9 @@ export class UsbLiveSyncService extends usbLivesyncServiceBaseLib.UsbLiveSyncSer
113112
}).future<void>()();
114113
}
115114

115+
protected preparePlatformForSync(platform: string) {
116+
this.$platformService.preparePlatform(platform).wait();
117+
}
116118
private resolveUsbLiveSyncService(platform: string, device: Mobile.IDevice): IPlatformSpecificUsbLiveSyncService {
117119
let platformSpecificUsbLiveSyncService: IPlatformSpecificUsbLiveSyncService = null;
118120
if(platform.toLowerCase() === "android") {

0 commit comments

Comments
 (0)