Skip to content
This repository was archived by the owner on Feb 2, 2021. It is now read-only.

Commit e891950

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 93a7356 commit e891950

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

services/usb-livesync-service-base.ts

+4
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ export class UsbLiveSyncServiceBase implements IUsbLiveSyncServiceBase {
149149
this.$logger.trace("Syncing %s", filesToSync.join(", "));
150150
this.$dispatcher.dispatch( () => {
151151
return (() => {
152+
this.preparePlatformForSync(platform);
152153
this.syncCore(platform, filesToSync, appIdentifier, projectFilesPath, platformSpecificLiveSyncServices, notInstalledAppOnDeviceAction, beforeLiveSyncAction).wait();
153154
}).future<void>()();
154155
});
@@ -161,6 +162,9 @@ export class UsbLiveSyncServiceBase implements IUsbLiveSyncServiceBase {
161162
}).future<void>()());
162163
}
163164

165+
protected preparePlatformForSync(platform: string) {
166+
}
167+
164168
private isFileExcluded(path: string, exclusionList: string[], projectDir: string): boolean {
165169
return !!_.find(exclusionList, (pattern) => minimatch(path, pattern, { nocase: true }));
166170
}

0 commit comments

Comments
 (0)