Skip to content

Conversation

madchutney
Copy link
Contributor

Description

A fix was added in the last release to handle board detection when the a debug probe was added. This however meant that the detection was an order of magnitude slower.

This change tries the original quick way first and then fall back to the more robust way. This means for the majority of use cases it will be quicker but still work (albeit slower when the debug probe is connected).

Pull request type

[x] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

Testing

Before change:

▶ time mbedls   
| platform_name | platform_name_unique | mount_point   | serial_port            | target_id                | daplink_version |
|---------------|----------------------|---------------|------------------------|--------------------------|-----------------|
| K64F          | K64F[0]              | /Volumes/MBED | /dev/tty.usbmodem14202 | 02400201CCF63E703108C3C8 | 0201            |
mbedls  1.30s user 0.17s system 85% cpu 1.717 total

After change:

▶ time mbedls
| platform_name | platform_name_unique | mount_point   | serial_port            | target_id                | daplink_version |
|---------------|----------------------|---------------|------------------------|--------------------------|-----------------|
| K64F          | K64F[0]              | /Volumes/MBED | /dev/tty.usbmodem14202 | 02400201CCF63E703108C3C8 | 0201            |
mbedls  0.38s user 0.12s system 90% cpu 0.552 total
(ls_test) 

@madchutney madchutney merged commit dd035a4 into master Apr 16, 2020
madchutney added a commit that referenced this pull request Apr 16, 2020
Try quick way first and fall back to robust way if it fails
@madchutney madchutney deleted the mac-performance-part-deux branch April 30, 2020 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants