performance optimize , 1. cache string names 2. cache Charset

This commit is contained in:
jianghang.loujh
2022-11-16 17:33:02 +08:00
parent afef45500e
commit f7a4979b15
21 changed files with 231 additions and 146 deletions

View File

@@ -171,7 +171,7 @@ public class FileMixedMetaManager extends MemoryMetaManager implements CanalMeta
return null;
}
String json = FileUtils.readFileToString(dataFile, charset.name());
String json = FileUtils.readFileToString(dataFile, charset);
return JsonUtils.unmarshalFromString(json, FileMetaInstanceData.class);
} catch (IOException e) {
throw new CanalMetaManagerException(e);