Minecraft 1.20.1 Forge 向け 起動プロファイリング & パラレル最適化ユーティリティ MOD
Startup Profiling & Parallel Optimization Utility for Minecraft 1.20.1 Forge
Built with Google DeepMind Advanced Agentic AI "Antigravity"
TheFastLaunch は、大規模 ModPack(200+ Mod)環境において発生する長大な起動待機時間のボトルネックを特定・プロファイリングし、Windows OS による 「応答なし(白画面 / Ghost Window)」フリーズの防止 や、Mod の並列処理化・キャッシュ最適化を行うオープンソースの最適化・診断 MOD です。
v-b1.8.3 では、すべてのダミー処理・未実測の数値を完全撤去し、「100% 実測値に基づく正直なプロファイリング」 と 「マルチサーバーとの完全なレジストリ整合性」 を担保する堅牢なアーキテクチャへと刷新されました。また、Forge 環境で Fabric MOD と誤認される原因となっていた誤混入ファイルを完全排除しました。
本 Mod は、実態のない宣伝用ログやハードコードされた短縮数値(「〇〇秒短縮!」といった固定表記)を一切排除しています。
- 実測値のみの記録: モデルベイク、アセット解凍、レジストリ構築などの処理時間は、すべて実行環境のタイマー(ミリ秒 / マイクロ秒単位)で計測された実測差分のみをログに出力します。
- 稼働モジュールのみの可視化: 実際に動作した最適化モジュールやプロファイラのみをアクティブ機能としてレポートします。未導入 Mod 向けの Mixin や待機状態の機能が誤認を招くログを吐くことはありません。
- データ完全性の保証: レジストリ同期の順序やアセットの整合性を最優先とし、高速化のためにゲームの安全性を犠牲にすることはありません。
Windows OS は、メインスレッドが一時的にビジー状態になると、ウィンドウを「応答なし」と判定して半透明の Ghost Window を被せます。TheFastLaunch は Win32 JNA API を通じて DisableProcessWindowsGhosting を呼び出し、重い Mod ロード中であっても Windows による不必要な白画面化を防止します。
大量の JSON 定義を読み込む JsonThings のパース処理を ForkJoinPool で並列化。アイテムやブロックの登録順序(builders および buildersByName)を決定論的(Deterministic)に完全同期することで、マルチサーバー接続時のレジストリ不一致(Registry Desync)やパケット切断を防ぎます。
- MBD2 (Multiblocked 2): 巨大なマルチブロック定義(数十〜数百MB)を含む NBT 定義ファイル群を
ForkJoinPoolで全コア並列 I/O & デコード。非圧縮 NBT(標準)および GZIP 圧縮 NBT の両方に対応し、サブディレクトリの完全再帰走査と決定論的・スレッドセーフなメインスレッド登録によってデータ破壊や同期ズレを完全に防止します。 - SimpleJson: リソース定義のスキャン処理を並列ストリーム化し、高速化を図ります。
Minecraft が起動時に Mod JAR(ZIP)からテクスチャやモデルを都度解凍するオーバーヘッドを軽減するため、ローカルの一時フォルダに事前解凍してダイレクト I/O で読み込みます。キャッシュは Mod JAR ごとの専用ディレクトリに完全に分離され、他 Mod とのアセット衝突(テクスチャの上書き・化け)を防ぎます。
Tinkers' Construct などのツール系 Mod が生成する天文学的な組み合わせバリアント(数万〜数十万件)によって JEI(Just Enough Items)が極端に重くなる現象を検知し、安全にフィルタリングして起動時のメモリ逼迫を緩和します。
- JEI Forge GUI プロファイリング: GUI ハンドラ登録の所要時間を追跡。
- EMI 検索インデックスベイク監視: EMI レシピおよびローカライズ検索インデックスの構築時間をプロファイリング。
- JEMI / Mekanism レシピブリッジ監視: 化学物質やカスタムスロットのスタック処理が正常に行われているかを安全に監視。
タイトル画面表示(FMLLoader.isLoadedComplete())を検知した段階で、起動時のみに使用された一時バッファや展開キャッシュを安全にパージ。GC 前後のヒープ使用量差分(MB)を実測してログに記録します。
起動プロセス完了時に、実際に稼働した最適化モジュール一覧と、各フェーズで測定された実測処理時間をコンソールおよびログに出力します。
[TheFastLaunch] ==================== FastLaunch Active Diagnostics ====================
[TheFastLaunch] [Active Modules]
[TheFastLaunch] - Win32 Ghost Window Prevention : ACTIVE (DisableProcessWindowsGhosting enabled)
[TheFastLaunch] - JsonThings Multi-Core Parser : ACTIVE (Synchronized Deterministic)
[TheFastLaunch] - MBD2 Parallel NBT Loader : ACTIVE (Multi-Core Parsed)
[TheFastLaunch] - SimpleJson Parallel Parser : ACTIVE (Worker Pool)
[TheFastLaunch] - ModelBakery Parallel Profile : ACTIVE (Profiled 1420ms)
[TheFastLaunch] - JEI Forge GUI Handler : ACTIVE (Registered)
[TheFastLaunch] [Measured Phase Timings]
[TheFastLaunch] - ModelBakery Bake : 1420 ms
[TheFastLaunch] - JsonThings Parsing : 850 ms
[TheFastLaunch] - MBD2 NBT Load : 320 ms
[TheFastLaunch] - Startup Cache Purge : Reclaimed 128 MB heap
[TheFastLaunch] =======================================================================
(※ 上記の数値は実行環境における実測例です。環境や導入 Mod 構成によって値は変動します)
TheFastLaunch is an open-source startup profiling and optimization mod for Minecraft 1.20.1 Forge. Designed for heavy modpacks (200+ mods), it identifies launch bottlenecks, prevents Windows "Not Responding" ghost windows, parallelizes CPU-bound parsing routines, and optimizes asset streaming.
In v-b1.8.3, all unmeasured claims, placeholder routines, and dummy logs have been entirely replaced with 100% measured, microsecond-level profiling and deterministic registry synchronization, ensuring complete stability and zero multiplayer desyncs. Also permanently removes accidental Fabric descriptor files to ensure 100% clean Forge/NeoForge modloader detection.
TheFastLaunch strictly adheres to an honest logging policy:
- Real-time Measurement Only: Timings for model baking, asset extraction, JSON parsing, and registry dispatch are strictly captured using system timers. No hardcoded or fabricated time-saving claims are permitted.
- Active Module Reporting: The diagnostic summary at the title screen only displays modules that actually executed in your current session.
- Deterministic Stability: Parallel routines are engineered with strict deterministic sorting to maintain absolute registry ordering and multiplayer parity.
Windows OS automatically overlays a translucent "Not Responding" ghost window when the main thread does not poll the message queue within 5 seconds. TheFastLaunch invokes Win32 JNA DisableProcessWindowsGhosting to physically prevent Windows from freezing the game window during intense mod loading.
Parallelizes JsonThings JSON parsing across the ForkJoinPool. Item and block builders (builders and buildersByName) are synchronized and deterministically ordered, preventing race conditions, ID shifts, and multiplayer connection drops (such as Tinkers' add-on item synchronization).
- Modular Block Data 2 (MBD2): Multi-core parallelizes heavy NBT configuration and massive multiblock definition files (tens to hundreds of MBs) using
ForkJoinPool. Supports both uncompressed and GZIP-compressed NBTs, recursive directory discovery, and deterministic thread-safe registration to prevent race conditions or multiplayer desyncs. - SimpleJson: Parallelizes JSON resource scanning across available worker threads.
Pre-extracts textures and model assets from mod JARs into isolated local cache directories per JAR (.fastlaunch_extracted_assets/<jar_name>/). This eliminates on-the-fly ZIP decompression overhead while strictly preventing asset collisions across different mods.
Monitors and safely filters combinatorial tool/weapon variants in Tinkers' Construct and its add-ons to prevent excessive memory consumption and JEI indexing freezes.
- JEI Forge GUI Profiling: Tracks handler registration duration.
- EMI Search & Recipe Indexing: Measures bake times for EMI search indices and localized databases.
- JEMI / Mekanism Bridge: Safely verifies custom chemical and stack handling without crashes.
Releases temporary startup buffers and pre-extraction caches once the title screen is reached (FMLLoader.isLoadedComplete()), recording the actual heap memory reclaimed in megabytes.
Upon reaching the main menu, outputs a clean, honest breakdown of active modules and their measured execution times.
- Minecraft: 1.20.1
- Mod Loader: Minecraft Forge 47.4.0+ (Forge 47.4.21 recommended)
- Java: Java 17 (64-bit)
- OS: Windows 10 / 11 (64-bit) (Win32 ghost window prevention is Windows-specific; other optimizations run cross-platform)
- Side: Client-only (Server does not require this mod; fully compatible with multiplayer servers)
git clone https://github.com/sabu8190/TheFastLaunch.git
cd TheFastLaunch
./gradlew buildThe compiled JAR will be generated at build/libs/TheFastLaunch-b1.8.2-1.20.1.jar.
This project is licensed under the MIT License. You are completely free to use, modify, distribute, and include it in modpacks.
- Author & Lead Developer: saburou8190
- AI Pair Programming Assistant: Google DeepMind Antigravity (Advanced Agentic Coding)
0 comments
log in to comment.