Skip to content

FancyMenu

BonsUnleashed edited this page Oct 7, 2026 · 3 revisions

FancyMenu

Minecraft 1.20.1 / Forge: this page documents that build and its measurements. For the separate 170-control Minecraft 1.21.1 port, see Minecraft 1.21.1 NeoForge.

One control for FancyMenu 3.9.14 (mod id fancymenu), client-side: on the render thread its render state lives in a plain field instead of three thread-local lookups per pose change. The switch checks the code it would change against the tested build; another build is left untouched with one WARN line (see How the patches are applied).

Key Target Side Since Kind
fancymenu_render_thread_state FancyMenu 3.9.14 CLIENT 1.0.28 opt

fancymenu_render_thread_state

Since: 1.0.28 · Target: FancyMenu 3.9.14 · Side: CLIENT · Kind: opt

Mixin: FancyMenuStateMixin

FancyMenu render state kept in a field on the render thread. FancyMenu tracks the current scale, translation and rotation of every PoseStack through three ThreadLocals, updated on every push, pop, scale, translate and rotate of every model part, block entity, item and HUD element: thousands of ThreadLocal lookups per frame, nearly all on the render thread. On the render thread the value now lives in a plain field that takes over what the thread's ThreadLocal held; every other thread keeps the ordinary ThreadLocal. Every thread sees exactly the values and objects it saw before. Read once at start.

Measured: 26.8 -> 16.8 ns per push, translate and pop on the render thread with 200 other ThreadLocals live; 412,008 checks identical.

Bons and Furious

Minecraft 1.20.1 / Forge 1.0.34

Compatibility

Controls by mod

Links

Clone this wiki locally