AvalancheMicroscopic RAM increased usage in newest commits

Hello,
I’m running triple GEM simulations and when trying to generate signals I ran into a problem. Trying to simulate electrons from one avalanche starting from the induction gap (75000 electrons): propagate them with signal calculation enabled. I’m using single plane electrode. First I tried that on one of the newest Garfield++ commits and the RAM usage increased to the point that the program was killed (I’m testing on my 16GB RAM laptop for now).

Since previously I encountered similar RAM issues after introducing multithreading for AvalancheMicroscopic (commit ac87dc707feeacc40e32ebdd0484312a6f7bfee8) I made a simple test: simulating 1000 electrons on 2 Garfield versions: newest commit (78c29d12ab158a18008e8db51eef5e593cb9a9db) and one before the multithreading was introduced (6e7773f5d6cb055f1e61a01cec52da01d693b0a7). For simplicity, on the newer version the multithreading was disabled. I was monitoring memory usage using htop.

Results:
Memory usage was roughly constant through whole execution of the program using older version of Garfield++.
For the newest version, the memory usage was gradually increasing throughout the program execution and stopped only when the simulation finished. For this small simulation it was able to finish, but with larger number of electrons this crushes the program.

I am wondering if this is Garfield++ issue in the newest versions? Is it connected to multithreading? Or maybe I need to treat the signal calculation differently in these newer versions?

Welcome to the ROOT Forum!
I’m sure @hschindl can help