Browse Source

REPORT-16668 模板信息收集会导致保存模板的时候非常卡

* commit '9064435dc6d297e643279be4adf4874ae656d030':
  限制文件大小
bugfix/10.0
Alex.Sung 6 years ago
parent
commit
12184a8724
  1. 3
      designer-base/src/main/java/com/fr/design/mainframe/template/info/TemplateInfoCollector.java

3
designer-base/src/main/java/com/fr/design/mainframe/template/info/TemplateInfoCollector.java

@ -36,6 +36,7 @@ public class TemplateInfoCollector implements XMLReadable, XMLWriter {
private static final String XML_TEMPLATE_INFO_LIST = "TemplateInfoList";
private static final String XML_FILE_NAME = "tpl.info";
private static TemplateInfoCollector instance;
private static final int MAX_SIZE = 512 * 1024 * 1024;
private Map<String, TemplateInfo> templateInfoMap;
private DesignerOpenHistory designerOpenHistory;
@ -167,7 +168,7 @@ public class TemplateInfoCollector implements XMLReadable, XMLWriter {
}
private boolean shouldCollectInfo() {
return DesignerEnvManager.getEnvManager().isJoinProductImprove() && FRContext.isChineseEnv();
return FileUtils.sizeOf(getInfoFile()) <= MAX_SIZE && DesignerEnvManager.getEnvManager().isJoinProductImprove() && FRContext.isChineseEnv();
}
/**

Loading…
Cancel
Save