ChainSafe / ChainSafe/lodestar
deserializeUint8ArrayBitListFromBytes ssz api performance issue
Open
meta-bug
- Dominant language
- TypeScript
- Stars
- 1.4k
- Forks
- 483
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 150
Description
### Describe the bug
This ssz api takes 2.5% time of a holesky node subscribing to all subnets
[holesky_subscribe_all_subnets_main.cpuprofile.zip](https://github.com/user-attachments/files/17554279/holesky_subscribe_all_subnets_main.cpuprofile.zip)
### Expected behavior
I see some `Uint8Array.slice()` api there, see if we can improve by using `Uint8Array.subarray()` to avoid memory allocation
part of #7186
### Steps to reproduce
_No response_
### Additional context
_No response_
### Operating system
Linux
### Lodestar version or commit hash
unstable and v1.22.0
Contributor guide
Assessment
This issue has not been assessed yet.