forked from External/mage
Lazy card loading
This commit is contained in:
parent
b04c8e485b
commit
d895b3e8d0
3 changed files with 55 additions and 17 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue