-
Notifications
You must be signed in to change notification settings - Fork 4
Glyph Rendering Performance #139
Copy link
Copy link
Open
Labels
Priority: MEDThis issue is of medium priority.This issue is of medium priority.Status: TodoThis issue has been approved and needs to be completed/implemented.This issue has been approved and needs to be completed/implemented.Type: BugThis issue contains a bug.This issue contains a bug.
Metadata
Metadata
Assignees
Labels
Priority: MEDThis issue is of medium priority.This issue is of medium priority.Status: TodoThis issue has been approved and needs to be completed/implemented.This issue has been approved and needs to be completed/implemented.Type: BugThis issue contains a bug.This issue contains a bug.
While testing optimizations & profiling with a lot of other mods, I found QuickPlay to come up quite a bit due to the GlyphRenderer class.

The issue here is the two
.stream()calls inGlyphRenderer#onRenderPlayer,Quickplay.INSTANCE.glyphs.stream().anyMatch(glyph -> glyph.uuid.toString().equals(player.getUniqueID().toString()))Quickplay.INSTANCE.glyphs.stream().filter(thisGlyph -> thisGlyph.uuid.equals(player.getGameProfile().getId())).collect(Collectors.toList()).get(0)This can be easily optimized to
or something similar, just to resolve the performance issue present here, as glyph's dont seem to have the ability to toggling them, so this will run every frame for every player(?).
This profiling was done in a minute, in Lobby 1 on Skyblock.