Skip to content

Conversation

@TuEmb
Copy link
Contributor

@TuEmb TuEmb commented Nov 26, 2025

related to #3432

Improvements:

  • changed minimum interval time to 7.5ms.
  • changed the codec prio to 7 (same as other threads)
  • removed 100ms delay in storage thread

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request aims to increase the speed of storage syncs over BLE by reducing the connection interval and removing a sleep in the data transfer loop. While these changes will likely improve throughput, they also introduce potential issues with power consumption and connection stability. My review includes two main points:

  1. The new fixed, short connection interval is aggressive and may not be supported by all central devices, and will increase power draw. I've suggested using a range to provide more flexibility.
  2. Removing the k_msleep can lead to a busy-wait loop when BLE buffers are full, which will also consume excessive power. I've recommended switching to a more efficient event-driven approach using callbacks and semaphores.

Addressing these points will help ensure the performance improvements don't come at the cost of significantly reduced battery life or connection reliability.

@TuEmb TuEmb marked this pull request as draft November 26, 2025 15:16
@TuEmb TuEmb marked this pull request as ready for review December 1, 2025 08:39
@TuEmb TuEmb requested a review from beastoin December 1, 2025 08:46
@TuEmb
Copy link
Contributor Author

TuEmb commented Dec 1, 2025

Tested on Iphone (still be able to live record):
image

Tested on Windows:
image

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.

1 participant