mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
don't wait updateWindowIcon and registerBundledFonts
This commit is contained in:
@@ -179,12 +179,6 @@ public class StartupUtil {
|
||||
activity.end();
|
||||
}
|
||||
|
||||
if (!Main.isHeadless()) {
|
||||
Activity activity = StartUpMeasurer.start(Phases.REGISTER_BUNDLED_FONTS);
|
||||
AppUIUtil.registerBundledFonts();
|
||||
activity.end();
|
||||
}
|
||||
|
||||
boolean newConfigFolder = false;
|
||||
try {
|
||||
Activity activity = StartUpMeasurer.start(Phases.WAIT_TASKS);
|
||||
@@ -238,12 +232,21 @@ public class StartupUtil {
|
||||
UIUtil.initDefaultLAF();
|
||||
activity.end();
|
||||
}));
|
||||
futures.add(executorService.submit(() -> {
|
||||
|
||||
// no need to wait - doesn't affect other functionality
|
||||
executorService.execute(() -> {
|
||||
Activity activity = ParallelActivity.PREPARE_APP_INIT.start(ActivitySubNames.UPDATE_WINDOW_ICON);
|
||||
// most of the time consumed to load SVG - so, can be done in parallel
|
||||
AppUIUtil.updateWindowIcon(JOptionPane.getRootFrame());
|
||||
activity.end();
|
||||
}));
|
||||
});
|
||||
|
||||
// no need to wait - fonts required for editor, not for license window or splash
|
||||
executorService.execute(() -> {
|
||||
Activity activity = ParallelActivity.PREPARE_APP_INIT.start(ActivitySubNames.REGISTER_BUNDLED_FONTS);
|
||||
AppUIUtil.registerBundledFonts();
|
||||
activity.end();
|
||||
});
|
||||
}
|
||||
|
||||
private static void configureLogging() {
|
||||
|
||||
@@ -6,6 +6,8 @@ public final class ActivitySubNames {
|
||||
public static final String UPDATE_WINDOW_ICON = "update window icon";
|
||||
public static final String INIT_DEFAULT_LAF = "init default LaF";
|
||||
|
||||
public static final String REGISTER_BUNDLED_FONTS = "register bundled fonts";
|
||||
|
||||
public static final String CHECK_SYSTEM_DIR = "check system dirs";
|
||||
public static final String LOCK_SYSTEM_DIRS = "lock system dirs";
|
||||
public static final String START_LOGGING = "start logging";
|
||||
|
||||
@@ -22,7 +22,6 @@ public final class StartUpMeasurer {
|
||||
|
||||
public static final String LOAD_MAIN_CLASS = "load main class";
|
||||
public static final String CONFIGURE_LOGGING = "configure logging";
|
||||
public static final String REGISTER_BUNDLED_FONTS = "register bundled fonts";
|
||||
|
||||
// this phase name is not fully clear - it is time from `IdeaApplication.initApplication` to `IdeaApplication.run`
|
||||
public static final String INIT_APP = "app initialization";
|
||||
|
||||
Reference in New Issue
Block a user