iconmaster5326 / AetherCraft

A fork of Graknol's Energy Manipulator mod. Turn matter into other kinds of matter today!
5 stars 3 forks source link

Slow boot up #5

Closed LemADEC closed 10 years ago

LemADEC commented 10 years ago

When adding the mod to our existing mod-pack, the boot/load time of the pack is increased by more than 30%. The game itself seems also slower when using the mod. Is there any config option we're missing ?!?

iconmaster5326 commented 10 years ago

I don't know about the game slowing down, but the reason for additional world load time is two-fold.

First of all, we need to do the entire recipe AV calculation as late as possible. Some mods don't add recipes until post-init, which means doing calculation there wouldn't get all the recipes we need for calculations. Therefore, we need to do it later: Right before the world loads. I wish we could offset our work in boot, where it wouldn't be noticed, but sadly some mods just HAVE to register the recipes we need way too late.

Second of all, more than 50% of AetherCraft's boot time deals with parsing the config files. Why? Because the files put things in readable (i.e. item name) format, and we need to construct a huge table of all the item names in the game to parse the configs. I'm glad to say, however, that with 1.7, we can use string ID names instead in the file format, most likely eliminating all table-building. So look forwards to that!

AetherCraft does some crazy things to get a full AV table; you might be surprised. However, I will continue to attempt to optimize this long process.