CraftedMods / nei-recipe-handlers

An extended recipe handler API for NEI
GNU General Public License v3.0
2 stars 0 forks source link

Cache Files Rebuilt On Every Startup #28

Closed MrSmite closed 5 years ago

MrSmite commented 6 years ago

Minecraft: 1.7.10 LotR: [1.7.10] LOTRMod B33.8 NEI: NotEnoughItems-1.7.10-1.0.5.120-universal neiLotr: neiLotr-0.6.0-ALPHA neiRecipeHandlers: neirecipehandlers-202-alpha CodeChicken: CodeChickenLib-1.7.10-1.1.3.138-universal

Issue:

Both itemCache.dat and recipeCache.dat are rebuilt on every startup during the post-init phase when no mods or recipes have been added or removed.

Notes:

This bug report is being filed per the mod author's request here to separate the issue out from another issue that has been closed.

Relevant discussion from previous thread:

I noticed with this iteration, the cache files are still regenerated during post-init and itemCache.dat is slightly larger (95 KB) than with the previous mod version (65 KB). The curious thing though is with recipeCache.dat.

When recipeCache.dat is generated, it sits at 15 KB. When MC is finished loading and you spawn into any SP world, before even opening your inventory, it increases to 22 KB (date modified changes) and stays that way. You can "save and exit", create a new world, go back into the existing one or "quit". The file will remain 22 KB until you restart MC where it is regenerated and back to 15 KB.

A complete list of mods can be found in the OP of the previous report. These are the mods in use when I noticed this issue and can serve as reference for which mods add or change recipes.

CraftedMods commented 6 years ago

I guess it's the same procedure as with the crash in the previous issue: Try to add one mod after another and look, when the cache files are regenerated every time on startup. You can speed it up by disabeling the support for all alloy forges in the configuration file of neiRecipeHandlers. But first try running the whole modpack with the disabled alloy forges, just to make sure that the support for them isn't the cause for the cache regeneration.

MrSmite commented 6 years ago

Sorry for the late reply,

My modpack isn't a true modpack. It's just mods that I've put together myself and I think some of them have a "no redistribution" license. I'll go ahead and run the procedure again, it will take me a few days though.

CraftedMods commented 6 years ago

@MrSmite I changed the cache management system with the newest version of neiRecipeHandlers. Please try the current released version to see whether the bug can be reproduced. Note that the file itemCache.dat is no longer used - instead a new file environmentCache.dat is relevant. It contains a list of all currently installed mods - of these mods are added/removed or updated, the recipe cache will be recreated.

MrSmite commented 6 years ago

@CraftedMods

Thanks for the update, I'll give it a try. Sorry I never posted back but life happened and I haven't had much time to play Minecraft lately, or any other game for that matter.

MrSmite commented 5 years ago

This is still an issue with:

Minecraft 1.7.10 neiLotr-1.0.0-ALPHA neiRecipeHandlers-2.0.2-ALPHA LOTRMod v34.3

MrSmite commented 5 years ago

Sorry, 'edit' buttond doesn't work... but by "this" I meant the rebuilding of the cache files which seems to cause MC to take a long time to start.

CraftedMods commented 5 years ago

Is the cache rebuilt evey startup now, or only once?

MrSmite commented 5 years ago

Is the cache rebuilt evey startup now, or only once?

Seems to be the same issue we discussed earlier. During PostInit, the cache is rebuilt, cpu is at 100% and it takes over 2 minutes on an i5-7500 to complete.

Nothing on my end has changed except the update to the mods listed above. I just haven't been playing much and I had temporarily disabled LotR mod anyway.

CraftedMods commented 5 years ago

That it is once rebuilt after certain changes, is the way the recipe loading works. The alloy forge recipes of the LOTR Mod are hard to process, and thus it can take that much time on some PCs. But the results should be cached and then reused for later startups, so those should be fast then. Could you send me your neiRecipeHandlers configuration file?

CraftedMods commented 5 years ago

Also, is there a way I could contact you privately (Discord, E-Mail (you could create a temporary address))? Then you could send me your modpack, and I can try it with your setup.

MrSmite commented 5 years ago

NOTE: I received your email and sent you the link. Removed my previous post because I can't edit on github and I didn't want the temporary email to be filled in case I need to resend.

MrSmite commented 5 years ago

I was reading past comments here and I wonder if this is still an issue with how MineTweaker exposes custom recipes. I only have a few custom recipes (less than 10) so I can't see why but I also didn't decompile everything to look at it in Eclipse either.

CraftedMods commented 5 years ago

Hm, I don't know. I'll try it with and without it, let's see what that changes...

MrSmite commented 5 years ago

I'm sure it's obvious from my modpack that Forge is required. I didn't include it because I didn't look up their policy... but i'm using 1.7.10-Forge10.13.4.1614-1.7.10

CraftedMods commented 5 years ago

That's the version I use too.

MrSmite commented 5 years ago

Well, I just tried loading by removing MineTweaker but there was no improvement. I remember last time we did this troubleshooting, DynamicRecipes and CraftTweaker were the problem... not so lucky this time ;(

CraftedMods commented 5 years ago

I'll be able to do some testing when I receive the E-Mail...

MrSmite commented 5 years ago

Tried sending it through a different service: guerrilla mail. Should show up as 'sharklasers.com'

MrSmite commented 5 years ago

How about now?

CraftedMods commented 5 years ago

Still nothing.

MrSmite commented 5 years ago

sigh

Sent you the link using my email. Apparently free services are only good for receiving and watching web ads.

CraftedMods commented 5 years ago

Ok, received it. I'll do some testing tomorrow. Thanks!

CraftedMods commented 5 years ago

Seems like neiRecipeHandlers assumes that some mod versions did change, or mods did get added or removed. EDIT: Seems to work fine for me. At the first time I started the pack, the generation of the recipes took very long (2,5 minutes), but on the later one, only ten seconds, because an existing cache was found, and the data were read from it. So I can't reproduce the issue you had.

MrSmite commented 5 years ago

I was coming to let you know I noticed the same thing....

My world kept crashing every time I tried to interact with a specific NPC near my spawn. Since it's an old world but I hadn't really done anything in it yet, I decided to "recreate world". I deleted all the NEI cache and it did take a while the first time but now it only takes a few seconds.

Maybe my world was so broken that it was actually the cause. Incidentally that NPC doesn't crash anymore either.

MrSmite commented 5 years ago

Thanks though for your prompt attention to this issue.

CraftedMods commented 5 years ago

No problem.

MrSmite commented 5 years ago

Hmm, after all that I had to revert back to

Minecraft 1.7.10 neiLotr-0.6.0-ALPHA neiRecipeHandlers-2.0.2-ALPHA LOTRMod B33.8

There is an incompatibility with LotR and Growthcraft and Waila causing an unrecoverable crash at world load ('Already Tesselating') when standing near a fence with rope attached.

Disabling Waila stops the crash but the fence / rope is untextured and right-clicking it gives you one of the LotR faction crafting tables...

MrSmite commented 5 years ago

edit

I know this isn't your bug, just wanted to share in case other people update to LotR 34.3 and crash thinking it's related to your nei plugins.