[GH-ISSUE #3234] resource pack issue #889

Open
opened 2026-11-02 15:42:39 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @mietowku on GitHub (Oct 28, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/3234

whenever you apply resource packs, the game would freeze and take a ridiculously long time to apply. same goes for turning them off. it makes the game also load for a really long time when you boot up the game with any resource pack on.

edit: the issue only happens on the windows version, i just tested it on linux mint and it seems to only take a second or two

Originally created by @mietowku on GitHub (Oct 28, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/3234 whenever you apply resource packs, the game would freeze and take a ridiculously long time to apply. same goes for turning them off. it makes the game also load for a really long time when you boot up the game with any resource pack on. edit: the issue only happens on the windows version, i just tested it on linux mint and it seems to only take a second or two
Author
Owner

@Domanffe commented on GitHub (Oct 28, 2026):

🤖 Agent: numbers from a Windows 11 machine, in case they help narrow this down. Same prepared root (versions/v0.2.93/.local/horizon-client/26.3, 28 181 files, 639 MB) and the same kind of pack (Vanilla Experience+, 2.2 MB zip).

Full launches, from %APPDATA%/horizon/logs and a local build:

UI bundle ready load assets
pack off 709 ms 1.40 s
pack on, overlay cache rebuilt 42 222 ms 43.16 s
pack on, overlay cache hit 5 734 ms 6.60 s

So it is the overlay build, and a pack selection with a cold cache pays it again, which is what toggling a pack in the screen does.

Where the cold build goes, from calling packs::build_overlay directly on that root with an empty cache directory:

  • 34.4 s cold, 4.5 s on a cache hit, with the copy link does today on Windows;
  • 20.8 s cold once the mirror uses fs::hard_link instead of fs::copy (PR #3286), so ~14 s of it was writing the prepared root out again;
  • the remaining ~21 s is 28 181 files created one at a time (a bare hardlink pass over the same tree took 8.1 s) plus the cache marker validating them by reading their content (cache::stamp hashes a file's bytes on not(unix)).

The two generic fixes would be junctions for the untouched directories, so the mirror stops enumerating the tree at all, and trusting size and mtime instead of content on Windows, which is most of what a cache hit still costs. PR #3286 takes only the copy-to-link part.

<!-- gh-comment-id:6474769982 --> @Domanffe commented on GitHub (Oct 28, 2026): 🤖 Agent: numbers from a Windows 11 machine, in case they help narrow this down. Same prepared root (`versions/v0.2.93/.local/horizon-client/26.3`, 28 181 files, 639 MB) and the same kind of pack (`Vanilla Experience+`, 2.2 MB zip). Full launches, from `%APPDATA%/horizon/logs` and a local build: | | `UI bundle ready` | `load assets` | | --- | --- | --- | | pack off | 709 ms | 1.40 s | | pack on, overlay cache rebuilt | 42 222 ms | 43.16 s | | pack on, overlay cache hit | 5 734 ms | 6.60 s | So it is the overlay build, and a pack selection with a cold cache pays it again, which is what toggling a pack in the screen does. Where the cold build goes, from calling `packs::build_overlay` directly on that root with an empty cache directory: - 34.4 s cold, 4.5 s on a cache hit, with the copy `link` does today on Windows; - 20.8 s cold once the mirror uses `fs::hard_link` instead of `fs::copy` (PR #3286), so ~14 s of it was writing the prepared root out again; - the remaining ~21 s is 28 181 files created one at a time (a bare hardlink pass over the same tree took 8.1 s) plus the cache marker validating them by reading their content (`cache::stamp` hashes a file's bytes on `not(unix)`). The two generic fixes would be junctions for the untouched directories, so the mirror stops enumerating the tree at all, and trusting size and mtime instead of content on Windows, which is most of what a cache hit still costs. PR #3286 takes only the copy-to-link part.
Author
Owner

@kira-horizon[bot] commented on GitHub (Oct 30, 2026):

Also reported on Discord by rappz: Discord thread

What I did: i try to apply a resource pack and then my game freezes and crashes
What happened: My game froze and then doesnt load and i have to end up relaunching the game by force closing horizon
What I expected: My game to apply the resource pack without issues
Does it happen every time? Yes it happens every time
Horizon version: nightly-2026-10-30-41672b1 Windows 11 Dell 13 PRO Intel cpu and intel intergrated graphics
There is no screenshot its just a white screen

<!-- gh-comment-id:6526285448 --> @kira-horizon[bot] commented on GitHub (Oct 30, 2026): Also reported on Discord by **rappz**: [Discord thread](https://discord.com/channels/1559227979002028052/1565745888133914824) > What I did: i try to apply a resource pack and then my game freezes and crashes > What happened: My game froze and then doesnt load and i have to end up relaunching the game by force closing horizon > What I expected: My game to apply the resource pack without issues > Does it happen every time? Yes it happens every time > Horizon version: nightly-2026-10-30-41672b1 Windows 11 Dell 13 PRO Intel cpu and intel intergrated graphics > There is no screenshot its just a white screen <!-- kira -->
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#889
No description provided.