ChainSafe / ChainSafe/lodestar

deserializeUint8ArrayBitListFromBytes ssz api performance issue

Open
#7,206 1 comment 0 reactions 0 assignees View on GitHub
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

Screenshot 2024-10-29 at 16 02 30

[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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.