TGeoManager destructor with a big geometry

Dear ROOTers,

I have a geometry with 280k nodes and 140k volumes. I cannot use replication as it is mentionned in:

[root.cern.ch/phpBB3/viewtopic.p … tor#p30703](TGeoManager destructor problem

because I need to have different TGeoMedium in each TGeoVolume.

It takes more than 20 minutes to delete the TGeoManager object (16 minutes to delete the TGeoVolume objects).

Any solution?

Best regards,

Emeric

I use root v5.34.28 version.