AE2 Search Optimization
If you have spent any serious time with Applied Energistics 2 in Minecraft, you know the pain of opening a terminal packed with thousands of item types only to watch the interface freeze for a second or two. That stutter, especially when the Tooltip search option is enabled, can grind your automation workflow to a halt. The AE2 Search Optimization mod tackles this exact problem head-on, making terminal searches feel nearly instant while also adding a slick recent search history feature that you never knew you needed.
Why AE2 Terminals Lag in the First Place
Vanilla AE2 (and its popular fork, AE2UEL) performs a full scan of every item's tooltip text every time you open the terminal or type a query. With 3,400+ item types in a typical end-game ME system, that means compiling and matching thousands of strings in a single GUI refresh tick. The result is the dreaded 1-2 second freeze that makes you think your game crashed. The AE2 Search Optimization mod fixes this by splitting the work into two clever optimizations.
Tooltip Search Index: Build Once, Search Fast
Instead of scanning every tooltip on every keystroke, this mod builds a persistent index of all tooltip text for every item in your system. The index generation is broken into small per-tick time slices, capped at 10 milliseconds per tick by default. This means the initial build happens in the background without causing a noticeable hitch. Once the index is ready, search results refresh automatically and match tooltip content in a fraction of the time. The trade-off is that the very first search after opening a terminal might take a moment to reveal tooltip-based results, but name searches and all subsequent queries are unaffected.
Search Query Cache: No More Regex Recompilation
Every search query in AE2 involves regex compilation and string splitting operations. Doing this for every single item in your ME system is expensive. The AE2 Search Optimization mod caches these repeated operations, so the same query doesn't trigger the same heavy computation twice. Combined with the tooltip index, the mod reduces the opening-terminal freeze and the first-search freeze from 1-2 seconds down to nearly imperceptible levels.
In benchmark tests with a terminal containing over 3.4k item types, the difference is night and day. Before optimization, opening the terminal with Standard Search enabled froze the game for 1-2 seconds. After optimization, both the open and the first search are smooth. This is a game-changer for players who rely on dense ME storage for large modpacks.
Recent Search History: A Quality-of-Life Boost
Beyond performance, the mod adds a dropdown below the search box in AE2 terminals. This recent search history feature is ported from the AE2 Recent Search mod (MIT License) and comes packed with useful options:
- Favorites: Pin frequently used search terms to the top of the list for priority display.
- Keyboard Navigation: Use the up and down arrow keys to quickly cycle through history entries without touching the mouse.
- Apply on Click: Click any history entry to instantly apply that search term to the terminal.
- Delete Single / Clear All: Remove individual entries or wipe the entire history with one click.
- Built-in Settings Panel: Open the configuration directly inside the AE2 container interface.
- Per-Player Storage: Each player on a server has their own separate search history, so no interference.
- External Search Sync: The mod supports syncing your search terms with JEI, keeping your workflow consistent across both interfaces.
Configuration Options
The config file is located at config/ae2searchoptimization.cfg and can be edited in-game or manually. Here are the key settings:
- searchOptimizationEnabled (default: true): Toggles the entire search performance optimization on or off.
- tooltipIndexBudgetMillis (default: 10, range 1-1000): Controls how many milliseconds per tick are spent generating the tooltip index. Higher values build the index faster but may introduce slight lag.
- maxVisibleEntries (default: 10): Sets the maximum number of entries shown in the recent search dropdown.
Supported Versions and Loaders
This mod is built for Minecraft 1.12.2 and is a client-side only modification, meaning you don't need to install it on your server. It works with the Forge mod loader, which is the standard for that version. The mod is designed to work with AE2UEL (Applied Energistics 2 Unofficial Extended Life), so make sure you have that version installed for the best experience. The client-side nature also means it is safe to use on multiplayer servers that don't have the mod installed.
How to Install
Learning how to install is straightforward. First, ensure you have Forge for Minecraft 1.12.2 installed. Then, download the mod jar file and place it into your mods folder. Launch the game, and the mod will automatically generate its config file. If you are using the foxygame.net launcher, you can take advantage of its one-click install feature for AE2 Search Optimization, which handles the mod jar placement and version compatibility automatically, saving you from manual folder navigation. The launcher's add-on catalog also keeps the mod updated whenever a new build is released.
To download AE2 Search Optimization, simply search for it on your preferred mod repository or within the foxygame.net launcher's mod browser. The mod is lightweight, with no additional dependencies beyond Forge and AE2UEL.
Final Thoughts
If you live in an AE2 terminal and hate the lag that comes with large storage systems, AE2 Search Optimization for Minecraft is an essential add-on. The performance gains are immediately noticeable, and the recent search history feature adds a layer of convenience that makes repetitive crafting and item lookup tasks much faster. The config options give you fine control over the trade-off between index build speed and smoothness, so you can tune it to your hardware. Whether you are a casual builder or a hardcore automation engineer, this mod removes one of the most annoying friction points in Applied Energistics 2. Give it a try and say goodbye to terminal freezes for good.