Browse Source

Pull request #13248: REPORT-107976 远程设计切换目录性能优化

Merge in DESIGN/design from ~ROGER.CHEN/design:feature/x to feature/x

* commit 'f482baa997d41c29d1e18fa3e71e32e1dfb930de':
  REPORT-107976 远程设计切换目录性能优化
feature/x
Roger.Chen-陈旺 12 months ago
parent
commit
24985b2139
  1. 6
      designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java
  2. 20
      designer-realize/src/main/java/com/fr/start/module/optimized/DesignerPluginActivator.java

6
designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java

@ -187,8 +187,10 @@ public class DesignerActivator extends Activator implements Prepare {
} }
CompletableFuture<Void> themeConfigPrepare = CompletableFuture.runAsync(() -> { CompletableFuture<Void> themeConfigPrepare = CompletableFuture.runAsync(() -> {
FormThemeConfigMigrator.getInstance().upgrade(); if (WorkContext.getCurrent().isLocal()) {
ReportThemeConfigMigrator.getInstance().upgrade(); FormThemeConfigMigrator.getInstance().upgrade();
ReportThemeConfigMigrator.getInstance().upgrade();
}
}, DesignerStartupPool.common()); }, DesignerStartupPool.common());
CompletableFuture<Void> mainDesignerPrepare = CompletableFuture.runAsync(this::designerModuleStart, DesignerStartupPool.common()); CompletableFuture<Void> mainDesignerPrepare = CompletableFuture.runAsync(this::designerModuleStart, DesignerStartupPool.common());

20
designer-realize/src/main/java/com/fr/start/module/optimized/DesignerPluginActivator.java

@ -3,7 +3,11 @@ package com.fr.start.module.optimized;
import com.fr.module.Activator; import com.fr.module.Activator;
import com.fr.module.ModuleContext; import com.fr.module.ModuleContext;
import com.fr.plugin.PluginActivator; import com.fr.plugin.PluginActivator;
import com.fr.plugin.manage.PluginManager;
import com.fr.start.common.DesignerStartupExecutor; import com.fr.start.common.DesignerStartupExecutor;
import com.fr.workspace.WorkContext;
import com.fr.workspace.WorkspaceSwitchHelper;
import com.fr.workspace.WorkspaceSwitchProcess;
/** /**
* created by Harrison on 2022/06/22 * created by Harrison on 2022/06/22
@ -12,13 +16,21 @@ public class DesignerPluginActivator extends Activator {
@Override @Override
public void start() { public void start() {
WorkspaceSwitchProcess process = WorkContext.getSwitcher().getProcess();
DesignerStartupExecutor.getInstance().execute(() -> ModuleContext.getModule(PluginActivator.class).start()); if (WorkspaceSwitchHelper.supportHotSwitch(process)) {
PluginManager.getHotModule().start();
} else {
DesignerStartupExecutor.getInstance().execute(() -> ModuleContext.getModule(PluginActivator.class).start());
}
} }
@Override @Override
public void stop() { public void stop() {
WorkspaceSwitchProcess process = WorkContext.getSwitcher().getProcess();
ModuleContext.getModule(PluginActivator.class).stop(); if (WorkspaceSwitchHelper.supportHotSwitch(process)) {
PluginManager.getHotModule().stop();
} else {
ModuleContext.getModule(PluginActivator.class).stop();
}
} }
} }

Loading…
Cancel
Save