Tests: fixed performance problem (x20 speed up, no need to call full garbage collector manually)

This commit is contained in:
Oleg Agafonov 2018-01-09 19:27:25 +04:00
parent b353a25f57
commit 8e3b610a0c
3 changed files with 1 additions and 3 deletions

View file

@ -122,7 +122,6 @@ public class CardGrid extends javax.swing.JLayeredPane implements MouseListener,
addCard(card, bigCard, gameId, drawImage); addCard(card, bigCard, gameId, drawImage);
} }
} }
// System.gc();
drawCards(sortSetting); drawCards(sortSetting);
this.setVisible(true); this.setVisible(true);
} }

View file

@ -648,7 +648,7 @@ public class DownloadPictures extends DefaultBoundedRangeModel implements Runnab
logger.fatal("Couldn't unmount zip files", e); logger.fatal("Couldn't unmount zip files", e);
JOptionPane.showMessageDialog(null, "Couldn't unmount zip files", "Error", JOptionPane.ERROR_MESSAGE); JOptionPane.showMessageDialog(null, "Couldn't unmount zip files", "Error", JOptionPane.ERROR_MESSAGE);
} finally { } finally {
System.gc(); //
} }
closeButton.setText("Close"); closeButton.setText("Close");
updateCardsToDownload(jComboBoxSet.getSelectedItem().toString()); updateCardsToDownload(jComboBoxSet.getSelectedItem().toString());

View file

@ -116,7 +116,6 @@ public abstract class CardTestPlayerAPIImpl extends MageTestPlayerBase implement
if (currentGame != null) { if (currentGame != null) {
logger.debug("Resetting previous game and creating new one!"); logger.debug("Resetting previous game and creating new one!");
currentGame = null; currentGame = null;
System.gc();
} }
currentGame = createNewGameAndPlayers(); currentGame = createNewGameAndPlayers();