Lazy card loading

This commit is contained in:
magenoxx 2012-06-05 19:41:17 +04:00
parent b04c8e485b
commit d895b3e8d0
3 changed files with 55 additions and 17 deletions

View file

@ -121,6 +121,8 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
private static ScheduledExecutorService pingTaskExecutor = Executors.newSingleThreadScheduledExecutor();
private static long startTime;
/**
* @return the session
*/
@ -300,6 +302,7 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
disableButtons();
if (PreferencesDialog.getCachedValue(PreferencesDialog.KEY_CARD_IMAGES_CHECK, "true").equals("true"))
checkForNewImages();
logger.info("Client start up time: " + ((System.currentTimeMillis() - startTime) / 1000 + " ms"));
if (autoConnect())
enableButtons();
else {
@ -930,6 +933,8 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
*/
public static void main(final String args[]) {
startTime = System.currentTimeMillis();
Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
public void uncaughtException(Thread t, Throwable e) {
logger.fatal(null, e);