AppliedEnergistics / Applied-Energistics-2

A Minecraft Mod about Matter, Energy and using them to conquer the world..
https://appliedenergistics.github.io/
Other
1.43k stars 653 forks source link

Performance issues on Terminal if Craftable only view is active #3405

Closed jkroepke closed 6 years ago

jkroepke commented 6 years ago

Description

Using the ME Network on a Terminal work fine. But If I search for an item and set the view to craftable only. The client will start to lag and after 30 seconds the client ll be kicked from the server.

Switch back View items only or hybrid view brings the client performance back.

Screen from VisualVM

bildschirmfoto 2018-03-02 um 20 05 35 bildschirmfoto 2018-03-02 um 20 18 24

The performance comes not from AE2 directly, it looks for me that Biomes O' Plenty are the reason for that.

I'm want to report this issue here, because behavior isn't constant. It appears only an the "craftable only" - not on the Stored Item or Stored Item / Craftable View

Environment

yueh commented 6 years ago

In terms of consistency, it should only happen when these conditions are true:

By default we already cache the tooltips for something like that, but it is not done for the craftable only view currently as we cannot touch the underlying itemstack data. So it will be copied, which will not copy the cached tooltip for obvious reasons like memory usage. So it has to fetch it for every update again, but this only happens when the network inventory changes.

We might be able to ease it a bit. BUT this should not solve the actual issue. Which certainly needs further monitoring and should also be reported to any involved mod. E.g. it could actually be caused by JEIIntegration combined with Biomes O' Plenty. Any other mod with a more trivial approach for using tooltips could easily suffer from it.


Edit: Depending on the mentioned mods, it might also only happen when the advanced tooltips are enabled via F3 + H

jkroepke commented 6 years ago

Edit: Depending on the mentioned mods, it might also only happen when the advanced tooltips are enabled via F3 + H

I'll test it but in our setup it doesn't matter.

yueh commented 6 years ago

Yeah. That was just a guess, hoping that the mod extending the tooltips is smart enough to only enable it when the advanced option is enabled.

Could you try this build? It is not perfect, as displaying the tooltip will still resolve it a second time. But at least the search should mostly run against a cached version.

jkroepke commented 6 years ago

Can you provide a build with an beta version? I have mods installed that require a rv5-beta

Missing Mods:
    appliedenergistics2 : [rv5-beta-1,)

Thanks for the support here.

yueh commented 6 years ago

Not possible with the CI setup and I would also prefer that CI builds do not float around as beta or even stable releases. Best option here would be the branch yourself.

jkroepke commented 6 years ago

I setup a own build based on branch fix-3405.

I'm unable to reproduce it now. Thanks you.