Potential performance optimizations
magicus opened this issue ยท 3 comments
This is what is left over from our ideas in #1002, that is not covered elsewhere. It is not obvious that any of these needs to be done, or even should be done, but I'll keep them around for now in this bug.
The list:
- Reference
WynntilsMenuScreen
class in mod-init time to prevent class loading in-game - Guide screens should not hold all guide item stacks and they should not need to load them in-game.
-
FontRenderer.renderText
callsComponentUtils.stripColorFormatting
which is uniquely expensive, and probably not needed in most cases. We should move the responsibility of sending in text without color formatting to callers, so they know if it is needed or not. -
InfoBoxFeature.render
callsManagers.Function.getLinesFromLegacyTemplate
which is extremely slow. We should move it out of rendering, being done every Nth tick, and possibly look for ways to make it faster as well. -
RemoteWynntilsUserInfoModel.onPlayerJoin
is somewhat expensive, due toManagers.Net.callApi
. Unclear if we can do anything about this. -
TooltipFittingFeature.onTooltipPre
apparently takes a lot of time callinggetOptimalTooltipWidth
, even though we should not have drawn any tooltip during the recording session. Needs to be looked at. -
ScoreboardHandler.handleScoreboardReconstruction
spends a lot of time processing the stream ofreconstructedScoreboard
at line 222. It also seems to be allocating a lot of objects. See if we can do this better.
Yes, it seems reasonable this list of issues is not relevant after the last changes to the code base.
However maybe we should do another performance testing round to see if anything new has crept up?