4.68T Optimization Test

A place to talk to other users about the mod.
User avatar
Benanov
Posts: 259
Joined: Sat Nov 03, 2012 5:12 pm

Re: 4.68T Optimization Test

Post by Benanov »

IMO testing graphics-intensive applications in a VM is theoretical wankery, because playing a cross-platform game in a VM is theoretical wankery.

MC lags pretty hard on Intel integrated hardware, which is 3D accelerated (with the CPU helping in places). I can't imagine a software-only pipeline is actually going to get you better than vacation slideshow frame rates.

I'm trying to actually contribute even on vacation & get BTW up on this ThinkPad (which is using Intel Integrated), but it's not the system I usually play on, and my wife wants to use the computer.
There's only one V in my name, thanks.

<TaterBoy> I figured out why there's so much lag. We have too much iron.
PeachMa5t3r
Posts: 14
Joined: Sat Mar 30, 2013 3:02 pm

Re: 4.68T Optimization Test

Post by PeachMa5t3r »

If you are working on optimizations and the nether isnt fixed i would suggest looking though the sound code. With my sound off in the netehr i get 10 fps higher then my usual 15.
User avatar
FlowerChild
Site Admin
Posts: 18753
Joined: Mon Jul 04, 2011 7:24 pm

Re: 4.68T Optimization Test

Post by FlowerChild »

PeachMa5t3r wrote:If you are working on optimizations and the nether isnt fixed i would suggest looking though the sound code. With my sound off in the netehr i get 10 fps higher then my usual 15.
Don't need suggestions...thanks.
User avatar
FlowerChild
Site Admin
Posts: 18753
Joined: Mon Jul 04, 2011 7:24 pm

Re: 4.68T Optimization Test

Post by FlowerChild »

Ok, did a nice little optimization pass on the pathfinding code, and will likely rewrite one other particularly nasty portion of MC's rendering code (I just posted about that in the add-on subforum) before putting this thing out into prime time.
OldMarriedDude
Posts: 181
Joined: Mon Sep 24, 2012 1:49 pm

Re: 4.68T Optimization Test

Post by OldMarriedDude »

As a follow up to my previous post, I had significantly less issue in the nether. I didnt check my FPS, but my chunk load stutter was significantly reduced. Thanks so much for working so hard to make BTW more playable for lower end machines.
User avatar
FlowerChild
Site Admin
Posts: 18753
Joined: Mon Jul 04, 2011 7:24 pm

Re: 4.68T Optimization Test

Post by FlowerChild »

OldMarriedDude wrote:As a follow up to my previous post, I had significantly less issue in the nether. I didnt check my FPS, but my chunk load stutter was significantly reduced. Thanks so much for working so hard to make BTW more playable for lower end machines.
No problem man! I'm honestly having quite a good time working on this, as it's quite a nice change of pace, and it feels really good to be hacking my way through some of this code that's been bothering me for so long ;)

It's not even so much me optimizing, as me just correcting Mojang's stunning lack of consideration for it :)

I don't get the impression chunk-load stutter is really something that you can accurately gauge from the frame-rate, as I suspect the numbers displayed are an average over a number of frames whereas that stutter is just one frame that takes a massive amount of time. I think it more comes down to feel on that one, because yeah, even on my system it definitely feels better.
User avatar
Benanov
Posts: 259
Joined: Sat Nov 03, 2012 5:12 pm

Re: 4.68T Optimization Test

Post by Benanov »

What about shift-F3 with the fps charts? That might show you huge spikes.
There's only one V in my name, thanks.

<TaterBoy> I figured out why there's so much lag. We have too much iron.
User avatar
FlowerChild
Site Admin
Posts: 18753
Joined: Mon Jul 04, 2011 7:24 pm

Re: 4.68T Optimization Test

Post by FlowerChild »

Well, looks like I finally tracked down the source of the nether stutter.

Get ready...

It's the stupid frigging lava sounds. If I comment them out, no stutter whatsoever. I can ride a couple of kilometers of Minecart rail, totally smooth.

Needless to say...will fix :)
User avatar
FlowerChild
Site Admin
Posts: 18753
Joined: Mon Jul 04, 2011 7:24 pm

Re: 4.68T Optimization Test

Post by FlowerChild »

Oi vey...ok, I think I understand what's happening here.

It's not the little pop sounds. I can leave those enabled. It's the gurgling sound.

I checked, and it turns out that sound sample lasts a whopping 8 seconds. They only get played at a distance of up to 16 blocks from the player, so I was having a hard time figuring out why the sound system is overload, and why it was only happening when you're moving.

I think what's happening is this:

If you're moving fast through the Nether, you may only be triggering those sounds at a distance of 16 blocks, but I think what's happening is you're leaving a whole trail of 8 second sound samples in your wake that are still playing when they're too distant to be heard anymore. Given there's a shit ton of lava in the nether, that adds up to a whole whack of long-ass sound samples that can be playing at any one time.

I've cut that gurgling sound down to only play at 1/10th the frequency when you're in the nether, and all stutter is gone.
User avatar
Thalarctia
Posts: 367
Joined: Wed Apr 11, 2012 12:54 pm

Re: 4.68T Optimization Test

Post by Thalarctia »

Nicely done with the nether lag! Dunno what thought process went into trying out the sounds, but kudos for finding the actual cause!

Somewhat related, I've noticed a lot of people mentioning stutter and low frames in the overworld during rain as well - Could it be a similar issue, ie. sound stacking?
User avatar
FlowerChild
Site Admin
Posts: 18753
Joined: Mon Jul 04, 2011 7:24 pm

Re: 4.68T Optimization Test

Post by FlowerChild »

Thalarctia wrote:Nicely done with the nether lag! Dunno what thought process went into trying out the sounds, but kudos for finding the actual cause!
Actually, the guy I gave shit to for making suggestions earlier in this thread? Well, I'd tried all kinds of different things to optimize lava, and nothing seemed to be helping it, so I decided to try out what he mentioned and turn off my sound in the options menu. Low and behold, the stutter went away entirely, and after a brief "wft?" I remembered the stutter started around the same time that Mojang put in those lava sounds back in the day.
Thalarctia wrote:Somewhat related, I've noticed a lot of people mentioning stutter and low frames in the overworld during rain as well - Could it be a similar issue, ie. sound stacking?
My understanding is that problem goes away when you turn off particles as opposed to sound.

If someone experiences that problem (I don't...which is another reason I doubt it's sound related) and could try turning off your sound effects entirely to see if it resolves it, then let me know.
Gareleus
Posts: 71
Joined: Fri May 04, 2012 9:42 pm
Location: USA

Re: 4.68T Optimization Test

Post by Gareleus »

Yeah my Comp is really low end and I can say that during the rain and even snow using minimal particles helps but not much, turning off sound however smooths everything out completely. Hope this helps.
User avatar
FlowerChild
Site Admin
Posts: 18753
Joined: Mon Jul 04, 2011 7:24 pm

Re: 4.68T Optimization Test

Post by FlowerChild »

Gareleus wrote:Yeah my Comp is really low end and I can say that during the rain and even snow using minimal particles helps but not much, turning off sound however smooths everything out completely. Hope this helps.
Really now? Well, back to the trenches for me then :)
User avatar
FlowerChild
Site Admin
Posts: 18753
Joined: Mon Jul 04, 2011 7:24 pm

Re: 4.68T Optimization Test

Post by FlowerChild »

Wow...ok, I just loaded the sound samples for rain into winamp and my computer slowed down to about 1 frame every 10 seconds, making it totally unusable until I managed to shut down winamp from the task manager.

Something is definitely fucked here. I've never had anything even remotely like that happen going through MC's sound samples before.
User avatar
Simurgh
Posts: 92
Joined: Wed Jan 23, 2013 7:11 am

Re: 4.68T Optimization Test

Post by Simurgh »

Yeah, just tested sound on/off and particle settings to see what happened - with sound off game plays much smoother. Kind of hard to explain but rain makes the game play very "jerkily" to me and this smooths that out. Turning particles to minimal makes very little difference on my system. There was also a problem with approaching or moving past 16 blocks away from my animal pens making my PC stutter like mad which turning the sound off fixes which may or may not be related to the issue with rain.

There was a bug report about this on mojangs bug tracker though which I guess is related to the same issue [Here] so I didn't really raise it as it wasn't related to the rendering optimisation you were doing.
User avatar
FlowerChild
Site Admin
Posts: 18753
Joined: Mon Jul 04, 2011 7:24 pm

Re: 4.68T Optimization Test

Post by FlowerChild »

Interesting. That would seem to indicate it happens when sounds move out of range and are killed or something as a result.

Would explain the lava thing, as a long sound sample when you are moving at high speed would be more likely to have that happen.
Six
Posts: 599
Joined: Sat Jun 02, 2012 6:27 am

Re: 4.68T Optimization Test

Post by Six »

FlowerChild wrote:Oi vey...ok, I think I understand what's happening here.

It's not the little pop sounds. I can leave those enabled. It's the gurgling sound.

I checked, and it turns out that sound sample lasts a whopping 8 seconds. They only get played at a distance of up to 16 blocks from the player, so I was having a hard time figuring out why the sound system is overload, and why it was only happening when you're moving.

I think what's happening is this:

If you're moving fast through the Nether, you may only be triggering those sounds at a distance of 16 blocks, but I think what's happening is you're leaving a whole trail of 8 second sound samples in your wake that are still playing when they're too distant to be heard anymore. Given there's a shit ton of lava in the nether, that adds up to a whole whack of long-ass sound samples that can be playing at any one time.

I've cut that gurgling sound down to only play at 1/10th the frequency when you're in the nether, and all stutter is gone.
Oh wow, nice work man. I'm pretty certain that sound is the main bottleneck on my computer too actually, flowing lava and water has often caused me trouble. I'm not sure if it would help, but another point I find I consistently drop to around 1 or 2 FPS for a few seconds is in my base, as I walk away from my 15 or so animals and they get to be around 16 blocks away. This will also not happen when I have sounds set to 0%
User avatar
Simurgh
Posts: 92
Joined: Wed Jan 23, 2013 7:11 am

Re: 4.68T Optimization Test

Post by Simurgh »

Yeah actually I have to echo a few other posters comments while trying to sound as un-ass-kissy as possible :)

It's totally above and beyond the call of duty for you to be even taking a pass at this kind of optimisation so any efforts you make at this is really appreciated. The improvements you've made so far are a decent quality of life upgrade to me and seem to get better on lower end systems so yeah, uhm, thanks and stuffs. Most other mods just add their content and run, this shows how much you care about the overall package I think.
User avatar
Gunnerman21
Posts: 378
Joined: Wed Aug 22, 2012 12:53 am
Location: WA, USA

Re: 4.68T Optimization Test

Post by Gunnerman21 »

I too have enormous lag-spikes when traveling specifically away from lots of sound from animals splashing in water and the water flow itself, I get to about 1 frame every three seconds, then when im far enough away from the splashing animal, the lag stops again. If you can fix this FC, I would pledge my minecraft days to you and never play another mod again <3
Spoiler
Show
I am... THE TAXI MAN.
savagelung
Posts: 61
Joined: Wed Apr 03, 2013 4:42 pm

Re: 4.68T Optimization Test

Post by savagelung »

I can confirm what a lot of the above posters have said with regards to animals. I think it was around version 1.3 that they supposedly fixed a bug involving chickens and lag. People had chicken singularities for egg production and as soon as you exited their 16-block sound radius, you experienced severe lag. I don't think I've had the issues with chickens since then, but I definitely have with other animals.

I've also noticed that, if there are an excess of different sounds (fire, lava, different kinds of mobs, etc.), the game sounds get derpy and you only hear small parts of sound samples. Usually I experience severe lag spikes when this happens.

I don't know if any of these things are related to the debugging you're doing, but I figured I'd throw them in just in case they helped you with whatever you're looking into. Thanks for fixing that Nether stuttering though! Now I should actually be able to build in the Nether!
Six
Posts: 599
Joined: Sat Jun 02, 2012 6:27 am

Re: 4.68T Optimization Test

Post by Six »

savagelung wrote:I've also noticed that, if there are an excess of different sounds (fire, lava, different kinds of mobs, etc.), the game sounds get derpy and you only hear small parts of sound samples. Usually I experience severe lag spikes when this happens.
I actually get this when I turn on my 8 millstone grinding setup with netherrack inside. The ghast screams seem to cut each other short and I get framerate drop (though the framerate drop comes with anything mass grinding). I don't believe it used to have this sound problem in much earlier versions, but I've never mentioned it before as I assumed it was a vanilla sound playing problem.
User avatar
FlowerChild
Site Admin
Posts: 18753
Joined: Mon Jul 04, 2011 7:24 pm

Re: 4.68T Optimization Test

Post by FlowerChild »

Six wrote: I actually get this when I turn on my 8 millstone grinding setup with netherrack inside. The ghast screams seem to cut each other short and I get framerate drop (though the framerate drop comes with anything mass grinding).
Ok, wait: are you saying you get a frame rate drop when you grind netherrack, or when you grind anything at all? You seem to be saying both within those two sentences.

Please be specific here, as misinformation just sends me running in circles, and not drag sound issues unrelated to performance into it.
User avatar
magikeh
Posts: 945
Joined: Mon Jul 04, 2011 9:57 pm
Location: Top -o- the Tower

Re: 4.68T Optimization Test

Post by magikeh »

one thing that i'd like to add to this discussion about the rain noise vs the particles. I don't know why but when you turn off the particles (when it is raining) the rain no longer makes noise.. so it is possible that the rain lagg is also attributed to sound, and not entirely particles. Just wanted to mention it as several video makers use that trick to 'mute' the rain sound while keeping all other game sounds going! ^_^/
Magical Shit
Show
Syruse|Work: i like magic shit
MagikEh: ...
MagikEh: >.>
MagikEh: <.<
»» MagikEh walks to the bathroom
Syruse|Work: hahaaaaaaaaa
Syruse|Work: wait
MagikEh: xD
Syruse|Work: fuck
Syruse|Work: NO
Syruse|Work: DONT
TheGroovyWorkshed
Posts: 20
Joined: Sun Dec 16, 2012 11:53 am

Re: 4.68T Optimization Test

Post by TheGroovyWorkshed »

I hope I've not got the wrong end of the stick here but I believe this is a fairly long-standing issue related to minecraft's implementation of OpenAL. The sound unloading fps drop, especially horrific when it's animals in water, is usually attributed to an old, crappy version of OpenAL and can be fixed, I believe, by updating LWJGL. Minecraft ships with version 2.4.2 but the latest version is actually 2.9.0 according to the minecraft wiki. Hope this helps.

P.S. I've been running this new BTW test version but I don't really have any reliable fps readings to give you because for some reason my computer seems to be affected by the cycle of the moon or something. Depending on what mood it's in I can get sometimes 10, sometimes 30 fps sitting in the same area but I always suffer from the sound lag issues. Sorry I can't help with the feedback.
User avatar
azagal73
Posts: 16
Joined: Tue Sep 25, 2012 1:27 pm

Re: 4.68T Optimization Test

Post by azagal73 »

TheGroovyWorkshed wrote:I hope I've not got the wrong end of the stick here but I believe this is a fairly long-standing issue related to minecraft's implementation of OpenAL. The sound unloading fps drop, especially horrific when it's animals in water, is usually attributed to an old, crappy version of OpenAL and can be fixed, I believe, by updating LWJGL. Minecraft ships with version 2.4.2 but the latest version is actually 2.9.0 according to the minecraft wiki. Hope this helps.

P.S. I've been running this new BTW test version but I don't really have any reliable fps readings to give you because for some reason my computer seems to be affected by the cycle of the moon or something. Depending on what mood it's in I can get sometimes 10, sometimes 30 fps sitting in the same area but I always suffer from the sound lag issues. Sorry I can't help with the feedback.
I seem to remember from one of Etho's videos he used to get horrible lag around his silverfish farm and he upgraded to a newer version of the LWJGL and this really helped him with the sound lag.

This is not the video from Etho, but someone else who tested this sound lag

Post Reply