% more mem.raku
use Zef;
use Zef::Client;
use Zef::Config;
my $chosen-config-file = %*ENV<ZEF_CONFIG_PATH> // Zef::Config::guess-path();
my $config = Zef::Config::parse-file($chosen-config-file);
my $zef = Zef::Client.new(:$config);
my $module="App::Cal";
loop {
(state $c++).say
my $candidates = $zef.find-candidates($module).head;
my $deps = $zef.list-dependencies($candidates).map(*.identity).cache;
}
resident memory up to 2G after 46 iterations here.
Your Environment
% raku -v
Welcome to Rakudo™ v2022.07.
Implementing the Raku® Programming Language v6.d.
Built on MoarVM version 2022.07.
% zef --version
v0.13.8
Context
Using Zef::Client/Config in a loop leaks memory.
Expected Behavior
Memory usage should stabilize
Actual Behavior
Memory usage increases
Steps to Reproduce
resident memory up to 2G after 46 iterations here.
Your Environment