[TIMOB-23351] Windows: Improve build and install time
GitHub Issue | n/a |
---|---|
Type | Story |
Priority | Medium |
Status | Open |
Resolution | Unresolved |
Affected Version/s | Release 5.3.0 |
Fix Version/s | n/a |
Components | Windows |
Labels | n/a |
Reporter | Fokke Zandbergen |
Assignee | Gary Mathews |
Created | 2016-05-10T10:11:03.000+0000 |
Updated | 2016-09-13T14:29:44.000+0000 |
Description
Windows builds can take some time, we should try to reduce this time as much as possible. There are a few things we can do to achieve this.
- During the build and installation process
wptool.exe
is executed a number of times in order to detect Windows devices. This is a time expensive process and also happens during desktop builds, which is unnecessary. We can combat this by caching the first results and re-use them (this is partially implemented already).
- When building apps that have previously been built, the build project is deleted and re-created again. Which also means a complete build is required again. This can be avoided by retaining the existing project and old copy over changes that have been made. Requiring only a partial rebuild.
- If the app already exists on the phone, we should attempt to make use of the update
command in the deploy tool. This should be must faster than the two step process of uninstall
and install
.
This is a smallish saving that could be made, I just used [console.time and console.timeEnd](https://nodejs.org/api/console.html#console_console_time_label) to check how long it takes to copy the files back to the original build dir, and it seems to be around 2.5 seconds. This is on a Macbook Pro retina with an ssd, so I imagine a traditional hdd will be even slower. From reading the code it seems like this is blocking so the build process will wait for this to complete before moving on