SimpleLogic Gates

SimpleLogic Gates

2M Downloads

NotifyProxyClient is trying to construct an instance of FontRendererFancy on each "message" being rendered

3TUSK opened this issue ยท 0 comments

commented

Synopsis

For each in-world message being rendered through NotifyProxyClient, it will try wrap the global FontRenderer (obtained from Minecraft.getMinecraft().fontRenderer) into a FontRendererFancy and use the wrapped version, which cause FPS lag due to frequent I/O operations.

Reproduction

  1. Having Charset 0.5.5.7 with the barrel module enabled at least.
  2. Place a barrel on ground. Any barrel will work.
  3. Right click barrel with empty hand so that the in-world message "Empty" is displayed.
  4. Notice the significant FPS drop.

Altrenative reproduction method:

  1. Having Charset 0.5.5.7 with Simple Logic installed.
  2. Place a Timer on ground.
  3. Right click the Timer without sneaking. An in-world message that indicates its current time interval setting will pop up.
  4. Notice the significant FPS drop.

Analysis

Constructing FontRendererFancy will cause it reading default char. width data as well as other data from the current resource pack repository. Constructing it on each time in-world message being rendered leads to nothing but lag. This can be seen from the following sampling data (recorded using JVisualVM):

Charset-NotifyProxyClient.zip

image

Proposed Fix

Keep a global FontRendererFancy somewhere, or use Minecraft.getMinecraft().fontRenderer directly if there is no special need.