Resourceful Bees

Resourceful Bees

10M Downloads

Massive FPS lag when putting jarred bees in a portable inventory

TheBrodsky opened this issue · 17 comments

commented

Modpack : AllTheMods6

Describe the bug
Holding an portable inventory item (backpack, shulker box, etc) which contains jarred bees will cause FPS lag to both the player holding the inventory and all nearby players within render distance of that player. The severity of the lag scales with the number of jarred bees, becoming noticeable at about 4-5 and becoming debilitating after about a dozen or more. Large enough numbers of jarred bees can drop FPS counter of all nearby players to 1. Type of bees do not appear to have an effect.

To Reproduce
Steps to reproduce the behavior:

  1. Get a shulker box or other portable inventory item (backpack, etc)
  2. Add a number of jarred bees to the portable inventory
  3. Hold portable inventory item in hand
  4. Watch as the FPS of you and your friends disappears

Expected behavior
Jarred bees stored in portable inventories should not cause FPS lag. Holding a backpack or shulker box with jarred bees should result in no issue.

please complete the following information:

  • Forge Version 36.1.16
  • Mod Version 0.6.7.2b

Additional context
Most (if not all) of the jarred bees were nametagged. I doubt this is important, and we didn't test non-tagged bees, but I figured I should include it.

commented

This is really baffling, why would an inventory that doesn't normally have any extra render information cause fps lag... At most a held inventory should render the item, yet the contents is affecting that? Something seems off...

commented

it doesn't

commented

Playing ATM6 v1.6.3c I placed 23 bees in a shulker box and experienced no impact to FPS as shown by this video

https://imgur.com/JzuVIOQ

commented

https://imgur.com/mpqjUoS
and this is with about half of them named sweetbee

oh and a beeper bee for fun

commented

Have you added any mods to your pack? What version of ATM6? What video card do you have? There’s nothing about the jars nor the shulker code that would cause this. So it’s either hardware or a mod interaction

commented

ATM6 v1.6.3c

GPU is gtx 1070, but the other players have different cards (all nvidia, but different).

I added one mod: optifine

To test if it was optifine I did the following:

  1. Asked another player without optifine to teleport to me
  2. Held the shulker box and asked if his fps dropped significantly. It did, as did mine.
  3. Gave him the shulker box to hold and asked if his fps dropped significantly. It did, as did mine.

So it appears to not be optifine related, or if it is it's more complicated than my test would have identified.

Additionally, just to rule out the possibility that it's related to an interaction with a nearby block or entity, I travelled to a different area outside of render distance of that base. The frame drop still occurred.

commented

Can you provide a gif/video showing the FPS drop? Also can you test in single player just for fun? Render stuff is purely client side and not server side. But I’d like to at least rule some stuff. In any case though idk that there would be much if anything we can do bc the only render stuff a bee jar has is a property override like the bow has to be able to color the jars when being rendered. But that’s like 3 lines of code registering it to a vanilla registry and then the coloring which is like 95% vanilla logic.

commented

Interesting, it may not be bees related. I decided to test other entity-holding items, like monster balls. I filled a shulker box about half way with monster balls containing sheep, chickens, and cows and held it. I saw a drop in fps, though not to the degree which is caused by the bee box.

I also wanted to test if it needed to be entity-holding items, so I filled my large backpack with miscellaneous items and held it. There was a small but consistent drop in fps (140->120) from this.

So, here's what appears to be the case:

  • the storage medium doesn't matter. I tried shulker boxes, large and small backpacks, and the reinforced chest from pneumaticraft.
  • items which hold entities (bee jars, monster balls) have the most significant effect
  • the items must be holding an entity. Empty bee jars do not have a noticeable effect
  • items which do no hold entities may still have an effect, but they need be present in large quantities (multiple tens of stacks)
  • placing these items in the world does not cause lag, only holding them does

On that note, I suppose you can close this issue since it doesn't appear to be bees-related.

commented

Can you provide a gif/video showing the FPS drop?

I did, it's a youtube link above.

commented

I'll test it in single player, and then I'll disable optifine and test again and report back if the thread is still open.

commented

Singleplayer - no lag
Multiplayer without optifine - lag

commented

I’m not familiar with that FPS counter does the same thing show when you use F3? And the fact that it’s not just our jars doing it tells me it’s some kind of mod interaction or some other wizardry. Render code is always handled purely client side regardless if you’re playing on a server or single player. But overall there’s nothing really special about the bee jar. Structurally it’s pretty much vanilla code and anything specific to us is pretty simple logic the just checks what bee is stored in the nbt data so it can color it properly.

I’m going to say that this isn’t an issue for us specifically given the additional information and it’s highly likely there’s nothing we can do to fix it.

commented

Fair enough. Any idea where I should forward this issue to? I'm out of leads at this point, since storage medium and item don't matter, and it's not an optifine thing.

commented

Honestly I’m not really sure. You’d most likely have to play a game of removing mods and testing if it breaks or doesn’t break to try and isolate a culprit. I’d even try doing just our mod and vanilla and see if it happens. Try a different pack that our mod is in like enigmatica 6 or sky bees and test it. There’s still too many variables to it to be able to identify any kind of solution.

commented

I get that it sounds ridiculous, but here is video proof: https://youtu.be/Thx1dBD4Zl8 (fps counter in upper left)

Granted, the lag in this case wasn't as extreme as it was when we tested yesterday, but it's still very noticeable.

Three different players have tried holding these bees in a bag or shulker box. Lag each time.

commented

Tested in multiplayer with just resourceful bees installed. No issue.