McJtyMods / EFab

Fabrication
MIT License
5 stars 9 forks source link

EFab causes major rendering lag #33

Open ZeekDaGeek opened 5 years ago

ZeekDaGeek commented 5 years ago

I'm currently getting to the end game of FTB and I've noticed that my FPS is tanking, when looking into the issue it seems like for what ever reason EFab crafters cause a massive amount of interference rendering other tile entities.

At the moment a setup that has about 64+ Crafters in one location and I started to profile the area using Lag Goggles and here are the results.

With EFabs: image

Without EFabs: image

Now... You're going to need to trust me on this next part. Every time I run the profile it seems to choose another random Vanilla entity to blame for the high render time per frame, but it always seems to be related to rendering EFab related machines.

image

This isn't really a poor computer hardware problem either. My specs are as follows:

Intel i7-7700k @ 4.8 GHz 16GB DDR 4 RAM GTX 980 x2 in SLI

It would be great to also have a config option to enable and disable complex rendering and have a simpler block version for each machine. Having rotating wheels and piston animations for no reason seems silly.

Mk01EF24 commented 5 years ago

Confirmed with some testing in a simpler world:

In a superflat world with the following mods:

Minecraft 1.12.2 Minecraft Coder Pack 9.42 Forge Mod Loader 8.0.99.99 Minecraft Forge 14.23.5.2770 McJtyLib 1.12-306 EFab 0.1.1

With the following hardware: Intel i7-6700K @ 4.00GHz 32GB @2133Mhz across 4 DIMMS GTX 970 x2 in SLI (Current Nvidia drivers (416.34)

Looking at the world with nothing in it except passive mobs with no VSYNC and Unlimited frame rate and 2 chunk render distance to avoid rendering distant passive mobs. 1600 FPS.

Looking at 5 eFab fabricators 680-700 FPS

Looking at 10 eFab fabricators 430-440 FPS

Looking at 20 eFab fabricators 250-254 FPS

Looking at 40 eFab fabricators 132-135 FPS

Looking at 80 eFab fabricators 71-72 FPS

Looking at 120 eFab fabricators 45 FPS

Looking at 160 eFab fabricators 36-37 FPS

Looking at 200 eFab fabricators 28 FPS

Looking at 240 eFab fabricators

24-25 FPS

McJty commented 5 years ago

Welll... If you have that many efab's then that's to be expected really. Remember that it is a TESR. Not much I can do about this. If you spam that many of many modded blocks you'll have a performance penalty

ZeekDaGeek commented 5 years ago

EFabs were made for FTB Continuum right? Have you looked at the end game recipe requirements for the pack? You need a lot of Crafters or recipes will take days and days.

Examples:

In order to make gem armor you need 240 Red Matter, which requires 98,000 Refined Hardeners. image

Each Hardener takes 5 seconds to craft image

It would take literally 136 hours to craft if you don't have multiple of them.

That's the easy one by comparison, Refined Iron is required in massive quantities by comparison, along with circuits for AE which go though Crafters as well.

For the pack this was designed for you need hundreds of Crafters, which isn't even unreasonable when you think of the fact that 256 furnaces placed down does nothing to your frame rate. If the requirements of the mod mean you need a large amount of the item maybe it should be rendered simpler.

McJty commented 5 years ago

Well that's not the requirement of the mod. That's how continuum uses it. The mod itself does not say you need to have such long times

ZeekDaGeek commented 5 years ago

Some optimizations that could be made would be just making it so every Crafter runs on the same animation instead of their own individual animation even, but even still an option to just turn them into plane boxes instead of 3D models for older machines or bigger builds.

McJty commented 5 years ago

Every crafting running the same animation doesn't help. It would still have to do the same rendering. It doesn't reduce anything. Having an option for a simpler model might be a possibility though

ZeekDaGeek commented 5 years ago

Sounds good to me, for the mean time I'll have to create a dedicated EFab dimension, which should be fun in it's own way. <3 Thank you.