Commit a4832ca
committed
fix: comparing shasums takes a lot of time
Comparing the old shasums and new shasums takes a lot of time as we use find for searching in a map. Instead, just check if we have the entry we are looking for.
In bigger projects (for example with more than 20 000 files including node_modules), the comparison may take more than 100 seconds, which breaks the LiveSync for Android as the socket is closed after 70 seconds without action.
So, in case you have a huge project and try `tns run android`, you'll probably receive:
```
Unable to apply changes on device: 192.168.3.101:5555. Error is: Socket Error:
Error: write ECONNABORTED.
```
After the change, the time for comparing 24 000 shasums is 25 ms instead of more than 100 seconds1 parent ffbceb6 commit a4832ca
1 file changed
+1
-1
lines changed
0 commit comments