Перейти к содержимому
Mineforgian

EmiAccelerator

Caches the EMI item stack list to disk and defers search index building to a background thread, drastically reducing EMI reload time.

Загрузки
7K
Подписчики
14
Обновлён
6 июня 2026 г.
Лицензия
AGPL-3.0-only

Опубликован 10 мая 2026 г.

EMI Accelerator

Caches the EMI item stack list to disk and defers search index building to a background thread, drastically reducing EMI reload time.

Overview

Every time you join a world or reload resources, EMI rebuilds the entire item stack list and search index. For modpacks with a large number of mods, this process can take tens of seconds, and the game UI freezes completely while the search index is being built.

EMI Accelerator solves this problem with the following optimizations:

  • Stack Caching: Serializes EmiStackList.stacks to JSON and caches it to disk on the first load. Subsequent game launches skip the full reload (around 130ms compared to ~40 seconds).
  • Deferred Search: Defers EmiSearch.bake() to a background thread, eliminating roughly 10 seconds of UI blocking.
  • Auto Refresh: Automatically updates EMI search results once background indexing finishes, with no manual re-input required.

Usage

Command Description
/emiacc status View cache status, file size, and hit count
/emiacc clear Delete the cache (rebuilds on next launch)
/emiacc reload Trigger an EMI reload manually
/emiacc reload --force Clear cache and force a full EMI reload

Configuration

Config file path: config/emi-accelerator/emi-accelerator.properties

Option Type Default Description
cacheEnabled boolean true Enable item stack caching
autoClearOnModChange boolean true Automatically clear cache when mod list changes
maxFileSizeMb int 100 Maximum cache file size (MB)
diagnosticsEnabled boolean false Write stage timings to reload-timings.json
deferredSearchEnabled boolean true Enable background deferred search indexing

How It Works

  1. EMI tag sync triggers → EmiReloadManager.reload()ReloadWorker.run() starts
  2. Check if the cache exists and is valid (SHA-256 mod list hash verification)
  3. Cache hit: Deserialize stack list directly → skip full reload → build search index in background → complete
  4. Cache miss: Proceed with normal EMI reload → asynchronously write cache after completion
  5. Automatically refresh the EMI UI after search build finishes, showing [EMI Accelerator] Search Ready

Dependencies

Mod Version Required
EMI 1.1.22+ Yes
  • Loader: NeoForge 21.1.228+
  • Side: Client-only
  • Environment: Minecraft 1.21.1

Build

./gradlew build

License

GNU AGPL 3.0

Ченджлог

1.1.3Релиз1.21.1 · 6 июня 2026 г.

1.1.3

  • Fix: Items with data components (e.g., Ender IO conduits) now display correctly instead of showing as <Missing> when cache is hit
  • Improvement: Search results are now synchronized immediately after background baking completes for deferred search, eliminating the need to wait for the SearchWorker
  • Improvement: Changed to VarHandle
  • Refactor: Cache format changed from JSON to StreamCodec + LZ4 binary format, resulting in smaller size and faster read/write
1.0.1Бета1.20.1 · 24 мая 2026 г.

Port /emiacc command, config system, diagnostics, and chat features from NeoForge Fix mixin crashes from NeoForge→Forge port

1.0.0Бета1.20.1 · 22 мая 2026 г.

Translate "EmiAccelerator" from 1.21.1 to 1.20.1

1.1.1Релиз1.21.1 · 17 мая 2026 г.

1.1.1 (2026-05-17)

Features:

  • Chat message toggle: use /emiacc chat command to hide/show chat messages (controls chat.hide_messages config option)
  • Debug mode toggle: use /emiacc debug command
  • Master toggle: use /emiacc enable command to turn the mod on/off
  • Localization support (en_us / zh_cn)
1.0.1Бета1.21.1 · 10 мая 2026 г.

Fixed: Fixed missing EMI craft history / usage history when cache is hit. The worker thread now runs all required stages completely when cache hits (recipe baking, BoM reload, persistent data loading, etc.), only skipping the reloading of stack list (saving about 5.5 seconds). The search index is still built asynchronously in the background. Changed: Cache hit reload time increased from ~130ms to ~18s (varies with mod count), while all EMI features work properly.

1.0.0Бета1.21.1 · 10 мая 2026 г.

Feature: Serialize EmiStackList.stacks to JSON cache on first reload Feature: Defer search index building to background thread to eliminate UI freezing Feature: Automatically clear cache when mod list changes (SHA-256 hash verification) Feature: Save diagnostic timing logs to config/emi-accelerator/reload-timings.json Feature: Added commands /emiacc status|clear|reload|reload --force

Комментарии

Загружаем…