Speed up snapshoting

Config can be fairly big, no need to deep clone it frequently
This commit is contained in:
Aleksey Kladov
2021-01-06 15:46:31 +03:00
parent f7a15b5cd1
commit 66ed821e18
3 changed files with 6 additions and 6 deletions

View File

@@ -609,7 +609,7 @@ impl GlobalState {
if let Some(json) = configs.get_mut(0) {
// Note that json can be null according to the spec if the client can't
// provide a configuration. This is handled in Config::update below.
let mut config = this.config.clone();
let mut config = Config::clone(&*this.config);
config.update(json.take());
this.update_configuration(config);
}