-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Faster device connecting on MacOS, plus improved logging
Summary: While investigating large delays in connecting to the mac we discovered two main problems. 1. The way we scan for devices on the serial port is to get a list of serial devices, try communicating with each one serially, and then look for a valid response. The problem is that intermittently trying to open a connection to a bluetooth listening device on macOS would take 30s to time out, which would slow the whole process. After talking with Cory, we realized we could filter the list of devices with the vendorID and productID and this makes it so we essentially only see our device (though it's not guaranteed unique). Now macOS connects as fast as windows (~4s) on the serial port. 2. The drive takes about 15s to mount on MacOS for some reason. We can't really speed this up without root access, so no real fix here, but overall perf is much better due to #1. While I was at it, it was helpful to add timestamps to the logs, as well as more logging info about connection time for any future issues. Also fixed incorrect slashes in the launch.json file which worked on windows but not mac. Also also found a race condition where the drive search could be left on if disconnected at the wrong time. As noted, all of that architecture could use some rethinking at some point due to the inherently async and unordered nature of the different components coming online or going offline. Reviewed By: conordickinson Differential Revision: D67461348 fbshipit-source-id: 2f123a66c8eac202acf8310d7e96df76276c1a78
- Loading branch information
1 parent
ae69932
commit 4fb73f6
Showing
9 changed files
with
48 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters