Skip to content

Conversation

sleepyHolo
Copy link

In card library, if you viewing upgraded cards -- both in library and in single card view, the game will new a temporary instance of cards to render. This happened in every frame and a new instance of AbstractCard means heap consumption from portrait (AtlasRegion object) of the card. Thus, I noticed a heavy use of heap when viewing upgraded cards.
屏幕截图 2025-06-17 221609
Graph above running with BaseMod v5.55.3 only

Thus, I added two patches to make SingleCardViewPopup and AbstractCard create new instance if need. There is still constantly consuming heap, but the speed is much smaller.
屏幕截图 2025-06-18 161654
Graph above running with BaseMod v5.55.3 and my patches

The only problem is that I use SpireReturn in patching AbstractCard.renderInLibrary (in RenderInLibrary.java). I am not sure whether it means problems or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant