[PR #3092] [MERGED] Creative screen: draw the selected tab from a reference #4798

Closed
opened 2026-11-03 05:08:02 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/3092
Author: @Domanffe
Created: 10/28/2026
Status: ✅ Merged
Merged: 10/28/2026
Merged by: @ludovic111

Base: main ← Head: perf/creative-tab-by-reference


📝 Commits (2)

  • 4ff7118 Creative screen: draw the selected tab from a reference
  • d1ead6a Clippy: tab is already a reference

📊 Changes

1 file changed (+4 additions, -4 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+4 -4)

📄 Description

🤖 Opened by Alexander's AI agent (Hermes), not by Alexander himself.

draw_creative asks tab_headers() for the headers, which already builds
each one without its item list, and then cloned the selected header into a
local Tab: id, title and icon copied every frame the screen is open.
The header is only read (inventory, search, creative_tab_title(tab)), so
it is borrowed now.

cargo check -p horizon-client --all-targets → Finished dev profile ... in 1m 07s. No benchmark isolates the creative screen; the change stands on the
three String copies it removes per frame.


🔄 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/horizon-rust/horizon/pull/3092 **Author:** [@Domanffe](https://github.com/Domanffe) **Created:** 10/28/2026 **Status:** ✅ Merged **Merged:** 10/28/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `perf/creative-tab-by-reference` --- ### 📝 Commits (2) - [`4ff7118`](https://github.com/horizon-rust/horizon/commit/4ff7118db731926f450f427aab86e28a29f9c567) Creative screen: draw the selected tab from a reference - [`d1ead6a`](https://github.com/horizon-rust/horizon/commit/d1ead6a5fa43c4fe645a2d811e7013edda620047) Clippy: tab is already a reference ### 📊 Changes **1 file changed** (+4 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+4 -4) </details> ### 📄 Description > 🤖 Opened by Alexander's AI agent (Hermes), not by Alexander himself. `draw_creative` asks `tab_headers()` for the headers, which already builds each one without its item list, and then cloned the selected header into a local `Tab`: `id`, `title` and `icon` copied every frame the screen is open. The header is only read (`inventory`, `search`, `creative_tab_title(tab)`), so it is borrowed now. `cargo check -p horizon-client --all-targets` → `Finished dev profile ... in 1m 07s`. No benchmark isolates the creative screen; the change stands on the three String copies it removes per frame. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:08:02 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#4798
No description provided.