* Performance: memory usage optimization for deck editor (removed bloated usage of ManaCosts -> ManaColor objects, see #7515);

This commit is contained in:
Oleg Agafonov 2021-02-12 14:08:17 +04:00
parent c3d55ea12a
commit 275e996c08
23 changed files with 170 additions and 143 deletions

View file

@ -56,7 +56,7 @@ public class CardInfoPaneImpl extends JEditorPane implements CardInfoPane {
try {
SwingUtilities.invokeLater(() -> {
TextLines textLines = GuiDisplayUtil.getTextLinesfromCardView(card);
StringBuilder buffer = GuiDisplayUtil.getRulefromCardView(card, textLines);
StringBuilder buffer = GuiDisplayUtil.getRulesFromCardView(card, textLines);
resizeTooltipIfNeeded(container, textLines.getBasicTextLength(), textLines.getLines().size());
setText(buffer.toString());
setCaretPosition(0);

View file

@ -308,6 +308,10 @@ public final class CardImageUtils {
// search broken files and delete it (zero size files)
// search temp files and delete it (.tmp files from zip library)
Path rootPath = new File(CardImageUtils.getImagesDir()).toPath();
if (!Files.exists(rootPath)) {
return;
}
Collection<Path> brokenFilesList = new ArrayList<>();
Collection<Path> tempFilesList = new ArrayList<>();
try {