mekanism / Mekanism

A mod for Minecraft
MIT License
1.36k stars 517 forks source link

FPS drop #1762

Closed XentoniX closed 9 years ago

XentoniX commented 10 years ago

I dont want to be a whiner but in my Mekanism room i drop to like 13-16 fps while i normaly have 50-60 fps. Purely when i look @ Mekanism i already see a FPS drop. The server has no TPS drop so its purely Graphical related. I dont know if it can be optimized or something.

If i have to guess its due to the Gasses pressurized pipes that are the cause. since that part lags the most. And u have allot if u have the 5x Ore processing system.

I wish the FPS drop would be less severe cause i love the mod its just a bit of a nausance to walk arround with such low FPS.

Mekanism 7.1.0.90

AdamosX commented 9 years ago

Ok, these screenshots make it strange. 2014-11-16_20 25 26 2014-11-16_20 25 37 2014-11-16_20 21 58 2014-11-16_20 22 07 2014-11-16_20 25 01

Telanor commented 9 years ago

I can reproduce it with just this setup:

javaw 2014-11-16 14-48-50-68 javaw 2014-11-16 14-49-04-22

But it's very inconsistent. It takes a good 10 seconds or so after hooking up the cable for the chunk update spam to start, but is always fixed immediately by removing the cable. The tubes seem to cause much less severe of an impact, but it still does seem to cause some chunk updates, it's hard to isolate it though.

AdamosX commented 9 years ago

Do you have machineeffects set to false? That's what I have.

unpairedbracket commented 9 years ago

I'm investigating this currently.

Telanor commented 9 years ago

I had machineeffects set to true, changing it to false seems to remove the chunk update spam.

Edit: Nevermind, spoke too soon. It seems the spam begins as soon as the machine's internal buffer is depleted... I think.

unpairedbracket commented 9 years ago

Try out build 130 - it should fix this issue in a large number of situations. Tick time issues caused by excessive tile updates may persist - I'll see about fixing them later.

Telanor commented 9 years ago

Build 130 seems to fix it, but I had to start a fresh install to test it, it was making my old mod set crash.

crunkazcanbe commented 9 years ago

@aidancbrady

Makanism causes huge FPS lag with the 5x ore process . It goes down to 10FPS around the chemical crystallizer . Its only when the MEK machines that are special for the 5x is running . When I stop them all with the high Redstone it stops the lag . So this makes me think it is makanism , and its machines . I am using enderio for all the power , gas , water , and item .

Its piratically unplayable , and has me so pissed ; because I have a 9K dollar PC I would not expect this . Seems like some rendering code is not efficient . I went back to just using the 4x ore process , because all the extra machines , and lag is not worth 5x . I am using the latest MEK as of today , and this problem is still going on . It was the same issue almost a year ago to .

Screenies https://imgur.com/GoNkCjP - https://imgur.com/rd7cWPT - https://imgur.com/NE1sAmk

All those screen shoots where from standing still in one spot all with in a few secs apart . If I stop the machines for the 5x process all the FPS lag is gone . The FPS is up and down standing near the machines . Going far from my base fixes this issue or like i said stopping the machines .

Solid proof it is the 5x ore processing machines . They are now removed back to just 4x , and all the 4x machines are running right now . Look https://imgur.com/Cf4bTKT - https://imgur.com/FgDd1i6 . 5X ore processing machines removed , and now back to 50FPS where I have the FPS set to max out because anymore FPS is a wast ; because the human eye can only see about 35FPS anymore is just a wast , and more work added to the CPU .

mcgraj3 commented 9 years ago

I was just discussing this problem with a few on Reddit and it seems most put their Mekanism machinery in another world or far-off chunk with a chunk loader to keep it active because of the rendering taking a lot of frames. The solution is to basically let the CPU do the work but not to draw it. I normally get the debug overlay's calculation of 180-200fps, which drops to about 40fps when I enter my base with a Tier 4 (5x) processing area. Running i5-4670, GTX 760, 8GB DDR3-1600 (3GB dedicated to Java).

crunkazcanbe commented 9 years ago

TBH man all the extra work required , and fps drop associated with the 5x its not worth it, and beside 4x is plenty for me . :) Its just with 2 r9 295x2 gpus in quadfire theres no excuse . I know mincraft does not take advantage of crossfire , but still one of my GPUs has 2816 stream processors and on top of this my i7 5960x theres no excuse .

I say bad rendering code that needs updated .

mcgraj3 commented 9 years ago

@crunkazcanbe Few things...

  1. Turn off the fancy pipes in the config, or...
  2. Use EnderIO conduits (they are all compatible, just tested these before I started rebuilding my base).
  3. Load your Mekanism machinery elsewhere so you don't have the rendering problem and framerate drop. Mystcraft, Compact Machines, there are many solutions out there apparently.
  4. 5x ores is worth it when you start running low on gold and you need more electrum to finish off the walls in your base.

By the way, don't blame "bad rendering code" on Mekanism alone, regardless if you have super video cards or not. Minecraft is still just a Java game and from the word go has been poorly optimized.

Also, your rig is overkill, especially if you think that the human eye can't distinguish more than 35 FPS. Humans on average can distinguish 150 FPS, which is why higher frequency displays exist.

cleverca22 commented 9 years ago

https://www.dropbox.com/sh/kaqgbrr3tg6o7uz/AABjZwuQLhvWK4nfyJSV9yXCa?dl=0

ive noticed that the energy conduits cause a major fps drop, and have also been replacing them with enderio conduits, though i must have missed a few because it still sucks in my base, 6 fps or less

turning fancy cables off hasnt made a noticable change, still 5 fps in the base

halvors commented 9 years ago

@unpairedbracket @aidancbrady Energy cubes causes the most laggy experience. If you have multiplies of them the FPS drops pretty much.

mcgraj3 commented 9 years ago

@cleverca22 Yeah, the fancy cable made a small difference in my case as well, but I am starting to realize that it is something more than that. Unless this mod can be optimized further, building a factory in a remote chunk (same/different world) and using Tesseracts to transfer items in and out is the only solution (since the framerate problem goes away when I leave my base). I haven't finished rebuilding with EnderIO conduits, but so far so good. I will see what happens when I finish building my sulfuric acid room.

@halvors I have heard this before on other discussion boards, but before I started moving to EnderIO Capacitor Banks, I had 2 Ultimate and 16 Elite Energy Cubes all collecting energy from multiple Mekanism generators and sending them forward to machines. As I mentioned above to cleverca22, I didn't see the drop until sulfuric acid processing.

crunkazcanbe commented 9 years ago

I have never used the mekanism battery's or cables or pipes . I use enderio for pipes wires and battery's. . The only thing i have from mekanism is the machines needed for ore processing . Funny thing is the machines for 4x ore causes 0 fps loss , but as soon as i add the few new machines needed for 5x ore processing my fps goes to shit. It has to be the rendering on those new machines that cause it . Also btw to those it my concern i know the human eye can not see much over 100fps , and my pc is just a hobby . Every month i buy the new and latest hardware . I build gamming pcs for a living and fps does count when your playing on one or more 4k screens. Any game that plays under 100fps is unexpectable to me.

Also no im not building more ore processing in another location . I like watching it and like it in my base.

unpairedbracket commented 9 years ago

I've tested just the 5x machines alone in a superflat world. This setup: 2015-03-12_19 43 01 Causes my fps to drop from 600 to around 270, but turning it on only causes a further drop to 260. Is it the ore processing machines causing the issue, or the sulfuric acid production? Does the fps recover if you look away from the machines? (If not, it's more than a simple TESR rendering code inefficiency)

mcgraj3 commented 9 years ago

@unpairedbracket I see it with sulfuric acid production. When they are running, framerate is significantly lower, regardless if I am looking at them or not. Once I move away from them and they are unloaded visually (they are still chunk-loaded), framerate resumes normally. I have tested this multiple times by turning off different parts of the production line. (I had each processing tier in a separate room; they weren't all clustered together. Framerate would be bad regardless if I was in the same room or not.)

unpairedbracket commented 9 years ago

What kind of numbers are you getting for chunk updates (next to framerate on the debug overlay) when they are and aren't running?

mcgraj3 commented 9 years ago

I have completely disassembled my base a few days ago to move said machinery into a remotely chuck-loaded area, so I wouldn't be able to get the numbers in production. I will try testing it later tonight in a creative world to see if I can duplicate my original setup.

mcgraj3 commented 9 years ago

I rebuilt my entire setup in creative, stage by stage, all the way to T4 crystal production. Imgur album here. Please see the attached descriptions for each image (F3 debug visible on all screenshots).

Results:

In my opinion, I really think T4 production needs a revamp. After rebuilding this setup, I can't say I am going to bother going past HCl production for a T3 (4x) processing.

Also, as a side note, the Chemical Washer is slow as molasses on a January morning, even with an array of them to feed a Chemical Crystallizer (I might create a separate ticket if this is not addressed). This machine needs upgrades in the worst way and is the bottleneck of the entire 5x ore production system.

Hope you enjoyed (loathed?) reading this, I took an evening to research this in lieu of building my new base. :)

minor edits to grammar

crunkazcanbe commented 9 years ago

Yep the chemical washer is the bottle neck. I am glad i wasn't the only one haveing a huge fps hit with the 5x ore processing. I am with you to im not going past 4x ore processing anymore with mekanism , and your right who in there right mind does not want to see all there hard work process! Mekanisms 5x ore processing rendering code needs looked at . Also would be nice if we could put upgrades in the chemical washer since its a huge bottle neck.