From: jprocter Date: Fri, 23 Apr 2010 14:20:46 +0000 (+0000) Subject: thread off a Filechooser instance on startup to make the dialog open quicker later on. X-Git-Tag: Release_2_5~52 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=1d6782e1c01674bc6b35e0c3ad264d233b1b598a;p=jalview.git thread off a Filechooser instance on startup to make the dialog open quicker later on. --- diff --git a/src/jalview/gui/Desktop.java b/src/jalview/gui/Desktop.java index e00f993..fa4e483 100755 --- a/src/jalview/gui/Desktop.java +++ b/src/jalview/gui/Desktop.java @@ -157,6 +157,18 @@ public class Desktop extends jalview.jbgui.GDesktop implements discoverer = new jalview.ws.Discoverer(); // Only gets started if gui is // displayed. + // Thread off a new instance of the file chooser - this reduces the time it takes to open it later on. + new Thread(new Runnable() { + public void run() { + Cache.log.debug("Filechooser init thread started."); + JalviewFileChooser chooser = new JalviewFileChooser(jalview.bin.Cache + .getProperty("LAST_DIRECTORY"), + jalview.io.AppletFormatAdapter.READABLE_EXTENSIONS, + jalview.io.AppletFormatAdapter.READABLE_FNAMES, + jalview.bin.Cache.getProperty("DEFAULT_FILE_FORMAT")); + Cache.log.debug("Filechooser init thread finished."); + } + }).start(); } /**