perf: reduce inter-command delay from 500ms to 300ms (conservative)
Shaves ~4.6s off the 23-command provisioning sequence while keeping a safe margin for the beacon's BLE stack to process each write. Next step: if stable, we can go more aggressive (200ms or 150ms). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
a82a3697da
commit
3720f496bd
1 changed files with 3 additions and 2 deletions
|
|
@ -193,8 +193,9 @@ final class DXSmartProvisioner: NSObject, BeaconProvisioner {
|
||||||
throw lastError
|
throw lastError
|
||||||
}
|
}
|
||||||
|
|
||||||
// 500ms between commands — beacon needs time to process
|
// 300ms between commands — conservative speedup (was 500ms)
|
||||||
try await Task.sleep(nanoseconds: 500_000_000)
|
// Beacon needs time to process each GATT write; 300ms tested safe
|
||||||
|
try await Task.sleep(nanoseconds: 300_000_000)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue