LazyDFU is an optimization mod that makes the initialization of DataFixerUpper "lazy" - that is, it will not immediately create the rules required to migrate data from older versions of Minecraft to newer versions until it actually needs to do so.
Why does it work?
In vanilla, all the conversion rules are pre-compiled upon game startup, and this process is extremely slow - almost 9 seconds on a high-end PC (with a Ryzen 9 3900X) and over 50 seconds on a mid-range 2017 laptop (with an Core i5-8250U!) What LazyDFU does is allow DataFixerUpper to initialize, but do not pre-cache any of the rules. As a result, the DFU rules are only compiled when a world needs to be converted. This means it is possible you may see lag spikes if LazyDFU forces the game to compile migration rules, but once complete there is no performance penalty.
Prove it to me
I recorded a video that shows you how effective LazyDFU is.
Comparing it to other mods
In comparison to other mods, LazyDFU has the primary advantage of being simple, safe, and having low impact on the game.
- LazyDFU and Cadmium are complementary to each other, however the improvements Cadmium makes are outweighed by LazyDFU avoiding DFU rule compilation as much as possible.
- LazyDFU is superior to Smooth Boot by removing the primary source of game CPU usage in the first few seconds to minutes of Minecraft boot times.
- LazyDFU is far safer than using a mod that removes DataFixerUpper entirely, which can lead to world corruption.