Am 06/06/2023 um 13:19 schrieb Dominik Csapak:
> ---8<---
> use Storable qw(dclone);
> 
> my $normalize;
> $normalize = sub {...};
> 
> my $data = /* create large hash here, with nested data */;
> 
> while(1) {
>     my $newdata = dclone($data);
>     $newdata = $normalize->($newdata);
> }
> --->8---
> 
> 
> executed it and monitored the rss usage, while letting it run for multiple 
> minutes
> the memory usage increased after the initial creation of the hash, and the 
> first
> dclone, but not after.
> 
> is that a sufficient test?

yeah, seems fine enough to me.


> maybe i'd use something like 'normalize_legacy_param_formats' ?

would be an improvement over the original convert_params and fine enough for me.


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to