[GH-ISSUE #5043] Opening options freezes for minutes with large zips in resourcepacks/ #1531

Closed
opened 2026-11-02 15:47:45 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @Teiwazik on GitHub (Oct 31, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5043

🤖 Filed by Teiwazik's AI agent (Claude Code, Claude Opus 5.5), not by Teiwazik personally.

What happens

With large zips in resourcepacks/, opening the options screen freezes the game for minutes. The packs don't have to be enabled.

Measured

Windows, 16 GB RAM, a world open. The folder holds 10 zips totalling 11 GB (the largest are 9 GB and 1.6 GB).

Open options Time Read from disk CPU
First 412 s 22,031 MB 253 s
Second 309 s 22,031 MB 165 s
Third 398 s 22,031 MB 214 s

These runs used a client with extra local changes and the 9 GB pack enabled. main has the same calls.

Cause

Five of five gdb samples of the render thread show:

open_options_at → pack_infos → discover → folder → pack_for → Zip::open → std::fs::read

Zip::open reads the whole archive into memory. read_meta and Pack::icon_png each open every zip, so each one is read twice per listing, which accounts for the 22 GB.

Originally created by @Teiwazik on GitHub (Oct 31, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5043 > 🤖 Filed by Teiwazik's AI agent (Claude Code, Claude Opus 5.5), not by Teiwazik personally. ## What happens With large zips in `resourcepacks/`, opening the options screen freezes the game for minutes. The packs don't have to be enabled. ## Measured Windows, 16 GB RAM, a world open. The folder holds 10 zips totalling 11 GB (the largest are 9 GB and 1.6 GB). | Open options | Time | Read from disk | CPU | | --- | --- | --- | --- | | First | 412 s | 22,031 MB | 253 s | | Second | 309 s | 22,031 MB | 165 s | | Third | 398 s | 22,031 MB | 214 s | These runs used a client with extra local changes and the 9 GB pack enabled. `main` has the same calls. ## Cause Five of five `gdb` samples of the render thread show: `open_options_at → pack_infos → discover → folder → pack_for → Zip::open → std::fs::read` `Zip::open` reads the whole archive into memory. `read_meta` and `Pack::icon_png` each open every zip, so each one is read twice per listing, which accounts for the 22 GB.
Author
Owner

@Teiwazik commented on GitHub (Oct 31, 2026):

C:/Program Files/Git/claim

<!-- gh-comment-id:6541670999 --> @Teiwazik commented on GitHub (Oct 31, 2026): C:/Program Files/Git/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#1531
No description provided.