Repository navigation
feat: add Minecraft memory allocation settings - #34
CodeZhangBorui wants to merge 3 commits into
Conversation
Store a validated global or per-profile maximum heap and serialize profile edits with installation updates. Expose physical memory snapshots and enabled mod counts for launch sizing. Signed-off-by: CodeZhangBorui <zhangborui.2008@foxmail.com> Assisted-by: Codex
Resolve automatic heap defaults from available memory, instance workload and the selected Java runtime. Apply manual maximum heap settings and preserve heap options declared by the Minecraft version. Signed-off-by: CodeZhangBorui <zhangborui.2008@foxmail.com> Assisted-by: Codex
Share one GPUI editor for automatic, inherited and manual preferences. Keep slider synchronization and numeric entry in the frontend. Signed-off-by: CodeZhangBorui <zhangborui.2008@foxmail.com> Assisted-by: Codex
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Sorry @CodeZhangBorui, you've used your own review budget of 250,000 diff characters for the last 7 days. You can request another review in 2 days and 23 hours by commenting |
PR Summary by QodoAdd automatic and per-instance Minecraft heap settings
AI Description
Merge Risk
|
Impact analysisRisk: Critical 41 files, 149 indexed symbols, 46 affected processes Note The changed-symbol list is capped. The counts and risk were computed over the full set. 9 per-symbol caller lookups could not resolve callers; confirm those symbols with a text search. Changed symbols
Affected processes
Upstream callers
Note Upstream callers were traced for 10 symbols; 96 further eligible symbols were not queried. Analyzed The draw.io mind map, Mermaid source and SVG preview are in the |
审阅者指南数据结构定义经验证的堆内存值和分配偏好,供状态层和启动层共享。
添加可选的单配置文件堆内存覆盖设置,并在更新配置文件文档时安全地保留该设置。
API公开物理内存快照、实例模组目录查询,以及配置文件锁定功能,以支持新的状态和启动行为。
提供配置文件更新错误,以及用于更改实例可选内存覆盖设置的序列化 API。
API 的使用根据配置文件或全局设置解析每个启动请求的内存策略,并在预览或启动前刷新模组工作负载。
实现计算自动堆内存默认值,并将其转换为 JVM 参数,同时遵循由版本提供的堆内存设置。
UI为全局设置和单个实例覆盖设置添加共享内存控件,并支持滑块与数字输入同步编辑。
配置调整工作区的 sysinfo 功能选择,以支持内存探测,同时避免启用无关的默认功能。
测试验证堆内存大小、JVM 参数优先级、持久化与锁定、模组计数以及启动集成。
锁文件和供应商代码在代码和依赖配置变更后,审阅依赖锁文件的更新。
提示和命令与 Sourcery 交互
自定义体验访问你的控制面板以:
获取帮助Original review guide in EnglishReviewer's GuideData structuresDefine the validated heap value and allocation preference that the state and launch layers share.
Add the optional per-profile heap override and preserve it safely when profile documents are updated.
APIExpose physical-memory snapshots, instance mod-directory lookup, and profile locking for the new state and launch behavior.
Provide profile update errors and the serialized API for changing an instance's optional memory override.
Uses of the APIResolve each launch request's memory policy from profile or global settings and refresh mod workload before preview or launch.
ImplementationCalculate automatic heap defaults and translate them into JVM arguments while respecting version-provided heap settings.
UIAdd shared memory controls for global settings and per-instance overrides, with synchronized slider and numeric editing.
ConfigurationAdjust workspace sysinfo feature selection to support memory probing without enabling unrelated default features.
TestsVerify heap sizing, JVM argument precedence, persistence and locking, mod counting, and launch integration.
Lock files and vendored codeReview the dependency lockfile update after the code and dependency configuration changes.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Code Review by Qodo
1. Frontend writes launcher settings and profiles directly
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 548caf82fa
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| Self::Manual(heap) => HeapDefaults { | ||
| initial_mib: None, | ||
| maximum_mib: heap.mib(), |
There was a problem hiding this comment.
Reject oversized manual heaps for 32-bit Java
When a user selects a 32-bit runtime and saves a manual heap above its addressable limit, this branch passes the value through unchanged (the suggested 3072 MiB already exceeds that limit), causing the JVM to abort before Minecraft starts. The automatic branch immediately below already detects 32-bit runtimes and caps them at 1024 MiB; manual values should receive equivalent validation or produce a useful configuration error.
Useful? React with 👍 / 👎.
Summary
Add automatic and manual Minecraft memory allocation. Manual mode exposes one maximum heap value through a slider and numeric input. Each instance can follow the global setting or save its own maximum heap in
.axlprofile.Motivation
Size the heap for the available memory and instance workload at launch while giving players a single value to adjust when they need a specific maximum.
Changes
Testing
Breaking Changes
Existing profiles inherit the new global setting, which starts in Automatic mode. The optional profile field requires no data migration.
Sourcery 摘要
新增可配置的 Minecraft 自动和手动内存分配功能,支持全局默认值、单个实例覆盖,以及启动时设置堆大小。
新功能:
错误修复:
增强功能:
测试:
Original summary in English
Summary by Sourcery
Add configurable automatic and manual Minecraft memory allocation with global defaults, per-instance overrides, and launch-time heap sizing.
New Features:
Bug Fixes:
Enhancements:
Tests: