williewillus / Botania

Home of Botania from 1.8.0 to half of 1.10.2. See upstream repo Vazkii/Botania instead.
52 stars 16 forks source link

Floating flowers causing major framerate lag #414

Closed Hund closed 8 years ago

Hund commented 8 years ago

I get around 250 FPS in a flat world and for every floating flower I add, I get a major framerate drop. About 10 flowers drops me down to around 15 FPS.

I'm running Linux with Java 1.8 and I've had this issue since 1.8.4. I don't know how to debug it and give you some concrete information to go with. Any ideas?

williewillus commented 8 years ago

Are these special floating flower (generating/functional) or just normal ones? If just one, does it happen with the other kind?

Hund commented 8 years ago

I've tried with the flower that generates mana from lava and the flower that makes crops grow faster. I haven't tried a decorative one.

williewillus commented 8 years ago

can you try and see if the same thing happens with one of the decorative ones (floating purple flower / floating glimmering purple flower, etc.)

Hund commented 8 years ago

They seems to be causing the same amount of framerate lag.

vladfrangu commented 8 years ago

Maybe it won't help, maybe it will...

Does anything get spit out in the console after you place them?

vladfrangu commented 8 years ago

And also, theres a more advanced F3 screen, that activates when you are holding shift and pressing f3 There will be a pie chart. What consumes the most?

Hund commented 8 years ago

Here's a screenshot.

2016-07-31_16 45 48

vladfrangu commented 8 years ago

Ok. Your game seems to freak out when the flowers are rendered.. (Or so I think)

Try without MultiMC? I think that might cause the issue? (Don't quote me on that)

Hund commented 8 years ago

It worked just fine in 1.7.10 though. But sure, first I'll have to figure out how to run Minecraft with mods not usuing MultiMC. :)

Hund commented 8 years ago

Same issue without MultiMC.

vladfrangu commented 8 years ago

Then its either the 3D model, or forge.. Try updating both Forge and Botania On Jul 31, 2016 19:26, "Hund" notifications@github.com wrote:

Same issue without MultiMC.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/williewillus/Botania/issues/414#issuecomment-236439673, or mute the thread https://github.com/notifications/unsubscribe-auth/ARIOMIZfru2LBpH64Hz0EWZb7MAIms_mks5qbMy-gaJpZM4JY6ad .

Hund commented 8 years ago

I'm running Botania r1.8-314 and Forge 12.18.1.2042. I've had this issue in Minecraft 1.8.4, 19.4 and now 1.10.2.

williewillus commented 8 years ago

can you try it with a mundane flower? testing it with a functional/generating flower is not accurate because now yuo're including the tick workload of the flower when we should just be profiling rendering

williewillus commented 8 years ago

okay, I've narrowed it down.

When I ported I took the techne model and converted it directly into json. It has a lot of individual cubes, I can probably rewrite the model to lower the cube count and hopefully get better frames.

Apart from that, I don't know what else is the issue (profiling shows nglDrawArrays as the highest consumer)

williewillus commented 8 years ago

This is partially alleviated by baking the models with proper face quads (6fps to 30fps for me in a normally 120fps world)

Full solution will take some time but the next build will have a stopgap

vladfrangu commented 8 years ago

@williewillus I can help with the models for the base, but not for the flowers..

Hund commented 8 years ago

@williewillus Mundane flower? You mean the decorative flower?

vladfrangu commented 8 years ago

Yes @Hund

Hund commented 8 years ago

I already tested them [Link]. At least the floating ones, the regular doesn't seem to cause any issues.

williewillus commented 8 years ago

It causes problems for both for me. I know the fix now, so thanks for the information, much appreciated

Hund commented 8 years ago

Okay. :) Good luck!

williewillus commented 8 years ago

Okay so here's the deal for this:

  1. I made the TESR use face quads properly, this gave me a 5fps ish boost
  2. I rewrote all the models completely to use less cubes, giving me another 5-10fps ish boost
  3. I added a config to render the floating flowers statically. Having this on means they render extremely fast (as fast as normal blocks like stone or fences aka nearly instantaneously), but don't animate at all. This is for the people that spam a ton of them :P
  4. Going forward I'm investigating options to improve the animated version further. Forge has something called a FastTESR that I'm experimenting with. Hopefully something comes to fruition. But the animated version should be faster now as is, and hopefully even faster with the FastTESR.

This will all be in next build.

Thanks for the patience, I'll be making another issue to track the FastTESR experimentation, so closing this out.