manekinekko / manekinekko/angular-web-bluetooth
Performance improvement
- Dominant language
- TypeScript
- Stars
- 199
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Description
**Is your feature request related to a problem? Please describe.**
We are seeing very slow response times using the library to write to a NUS serial service tx characteristic. For example, using python with the bleak BLE library we are seeing around 7-10ms response times. For the same request using angular-web-bluetooth library we are seeing on average 300 - 400ms response times. Our application requires many requests to load data from our devices so we would love to see similar performance to the python script.
**Describe the solution you'd like**
An improvement in the amount of time for the write subscription to return. Here is an example of a request we are making:
this.bluetooth.writeValue$(this.feritConnection.rx, slice)
.subscribe(() => { console.log("This on average takes around 300 - 400ms to return");};
**Additional context**
Cleaner screenshot of code we are using to write to the NUS serial service tx characteristic:

Definition of the NUS serial service:

Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the implementation of writeValue$ and trace the Web Bluetooth write path used for the NUS serial service tx characteristic. Measure the latency of the shown writeValue$ request, identify where the delay occurs, and verify that the callback returns substantially faster without breaking the write flow.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100