[PR #1107] [MERGED] use smallzstd and sync pool #1883

Closed
opened 2025-12-29 02:32:06 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/1107
Author: @jsiebens
Created: 1/2/2023
Status: Merged
Merged: 1/27/2023
Merged by: @juanfont

Base: mainHead: tweak_zstd


📝 Commits (1)

  • 8cc723a use smallzstd and sync pool

📊 Changes

3 files changed (+30 additions, -4 deletions)

View changed files

📝 flake.nix (+1 -1)
📝 go.mod (+1 -1)
📝 protocol_common_utils.go (+28 -2)

📄 Description

  • read the CONTRIBUTING guidelines
  • raised a GitHub issue or discussed it on the projects chat beforehand
  • added unit tests
  • added integration tests
  • updated documentation if needed
  • updated CHANGELOG.md

This PR tweaks the zstd encoding by using smallzstd package from tailscale and a sync pool, instead of creating a new encoder.
While this won't fix #1014 entirely, it could reduce CPU usage when sending mapresponses to the clients


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/juanfont/headscale/pull/1107 **Author:** [@jsiebens](https://github.com/jsiebens) **Created:** 1/2/2023 **Status:** ✅ Merged **Merged:** 1/27/2023 **Merged by:** [@juanfont](https://github.com/juanfont) **Base:** `main` ← **Head:** `tweak_zstd` --- ### 📝 Commits (1) - [`8cc723a`](https://github.com/juanfont/headscale/commit/8cc723a8509221e8f205b57184ed808d33580600) use smallzstd and sync pool ### 📊 Changes **3 files changed** (+30 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `flake.nix` (+1 -1) 📝 `go.mod` (+1 -1) 📝 `protocol_common_utils.go` (+28 -2) </details> ### 📄 Description <!-- Please tick if the following things apply. You… --> - [x] read the [CONTRIBUTING guidelines](README.md#contributing) - [ ] raised a GitHub issue or discussed it on the projects chat beforehand - [ ] added unit tests - [ ] added integration tests - [ ] updated documentation if needed - [ ] updated CHANGELOG.md <!-- If applicable, please reference the issue using `Fixes #XXX` and add tests to cover your new code. --> This PR tweaks the zstd encoding by using smallzstd package from tailscale and a sync pool, instead of creating a new encoder. While this won't fix #1014 entirely, it could reduce CPU usage when sending mapresponses to the clients --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 02:32:06 +01:00
adam closed this issue 2025-12-29 02:32:06 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#1883