Skip to content

perf: compress kitty forwarding when png is supported - #3934

Closed
samehkhamis wants to merge 1 commit into
herdrdev:masterfrom
samehkhamis:fix/kitty-png-forwarding
Closed

perf: compress kitty forwarding when png is supported#3934
samehkhamis wants to merge 1 commit into
herdrdev:masterfrom
samehkhamis:fix/kitty-png-forwarding

Conversation

@samehkhamis

Copy link
Copy Markdown

Herdr decodes pane images into raw pixels before forwarding them to the host terminal. For continuously updated graphics, the resulting output traffic can delay visible responses to input.

This change queries the host terminal's Kitty PNG support during Unix client startup. A successful response enables lossless PNG forwarding for RGB/RGBA images through the existing encoder dependency. Rejection, silence, or an encoding error preserves raw forwarding. The asynchronous query uses the existing input framing and does not block startup.

The minimum render interval also changes from 16 ms to 8 ms to permit presentation above 60 FPS. This affects all actively redrawing panes and may increase CPU usage.

Validation:

  • just ci passed: formatting, Clippy, 3,354 Rust tests, 107 Python tests, and 29 integration tests. XDG_RUNTIME_DIR was unset because it pointed to a nonexistent directory in the local environment.
  • Real client/server tests covered successful, rejected, unanswered, and delayed PNG replies, including mouse/reset interaction.
  • Four rendering benchmarks passed, including 1- and 15-pane configurations.
  • Continuous 800×600 image updates at a 120 FPS target delivered approximately 77 complete images per second to the outer terminal stream. This measures data delivery, not monitor refresh.

@coderabbitai

coderabbitai Bot commented Sep 11, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • ai-review

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: ab10265a-63e4-446b-a125-15ad9cf5a54d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@kangal-bot

Copy link
Copy Markdown
Collaborator

Hi @samehkhamis, thanks for your interest in contributing.

Herdr does not accept unsolicited implementation pull requests from contributors who are not listed in .github/APPROVED_CONTRIBUTORS.

The pull request author is not an approved contributor.

If you encountered a reproducible bug, report the observed behavior through the bug issue template. A report does not reserve the work or authorize a pull request; accepted fixes are normally implemented by Herdr’s maintainer-controlled agents.

Feature requests, behavior changes, and other proposals belong in GitHub Discussions. Do not open an issue merely to justify an implementation that was already written.

If a maintainer explicitly wants this implementation, they can reopen the pull request. Reopening by anyone else will be closed again automatically.

See https://github.com/herdrdev/herdr/blob/master/CONTRIBUTING.md for the contribution policy.

@kangal-bot kangal-bot closed this Sep 11, 2026
@samehkhamis
samehkhamis deleted the fix/kitty-png-forwarding branch September 11, 2026 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants