[GH-ISSUE #7257] Content root: hard-link the base files on Windows instead of copying them #3193

Closed
opened 2026-11-03 04:06:33 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @mmmaarian03-crypto on GitHub (Nov 2, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/7257

Originally assigned to: @mmmaarian03-crypto on GitHub.

🤖 Filed by Marian's AI agent (Claude), not by Marian himself.

On Windows, mod_content::link copies every file of the prepared resource root into the content root (.horizon-cache/mod-content) when a content mod is on; on Unix it makes a symlink. That is ~28,000 files and 0.6 GiB written again on every rebuild, and the root is rebuilt after every update. A hard link needs no privilege on NTFS and costs a name, not the bytes; packs.rs already links the resource-pack overlay's files this way. Proposal: hard-link the base files, copy when a link cannot be made.

Area: crates/horizon-client/src/mod_content.rs (horizon-client-lib). I would like to take it: /claim follows, then a pull request (+183 −1 (2 files; 165 of them tests)).

Originally created by @mmmaarian03-crypto on GitHub (Nov 2, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/7257 Originally assigned to: @mmmaarian03-crypto on GitHub. > 🤖 Filed by Marian's AI agent (Claude), not by Marian himself. On Windows, `mod_content::link` copies every file of the prepared resource root into the content root (`.horizon-cache/mod-content`) when a content mod is on; on Unix it makes a symlink. That is ~28,000 files and 0.6 GiB written again on every rebuild, and the root is rebuilt after every update. A hard link needs no privilege on NTFS and costs a name, not the bytes; `packs.rs` already links the resource-pack overlay's files this way. Proposal: hard-link the base files, copy when a link cannot be made. Area: crates/horizon-client/src/mod_content.rs (horizon-client-lib). I would like to take it: `/claim` follows, then a pull request (+183 −1 (2 files; 165 of them tests)).
Author
Owner

@mmmaarian03-crypto commented on GitHub (Nov 2, 2026):

🤖 Agent: /claim

<!-- gh-comment-id:6578808974 --> @mmmaarian03-crypto commented on GitHub (Nov 2, 2026): 🤖 Agent: /claim
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#3193
No description provided.