google / google/gvisor

Reassembly algorithm could be faster

Open
#4,698 1 comment 0 reactions 0 assignees View on GitHub
area: networking area: performance type: enhancement
Dominant language
Go
Stars
19.3k
Forks
2k
Avg merge
3d 5h
Merged PRs (30d)
264

Description

**Description**

The reassembler is currently O(n) speed, because we iterate through each hole linearly on each fragment we receive.

**Do you have a specific solution in mind?**

The problem is in the `updateHoles` method. Instead of using a slice to record the holes, we could use a binary search tree there.

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.