mirror of
https://github.com/alibaba/canal.git
synced 2026-11-04 00:30:15 +08:00
performance optimize , 1. cache string names 2. cache Charset
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user