Memory overconsumption + slowness for coverage over bed defined regions 
Hello,
So I'm trying mosdepth and having issue over memory consumption. I get over consumption of memory with around 600G of ram taken to deal with a 6G bam file. Though I need coverage for over 18 millions regions, which may be related to the issue. 
I am launching the following command : 
mosdepth -t 150 -n  -b Annotation/Bed_file.bed test/Sample_name Map/Sample_name.mapped.sorted.bam > test/log
For some reason execution is somehow slow. When i run a minimal test with 1000 regions in a bed file, it takes : 15 mins. Trying bedtool coverage, I get similar coverage but faster : 7 mins. 
I use mosdepth from a conda installation in a conda environment. 
So, would you have any insight on why this is happening? 
Thanks,
Seb
 