modkit icon indicating copy to clipboard operation
modkit copied to clipboard

modkit update tags threads

Open blipinskiaima opened this issue 2 months ago • 2 comments

Hello,

It seems that when using the latest version of your modkit 0.5.1, regardless of the number of threads I use for modkit update tags, it always takes up only one CPU in my htop windows. Is this normal?

Many thanks in advance. Best Boris

blipinskiaima avatar Oct 24 '25 15:10 blipinskiaima

Hello @blipinskiaima,

Sorry about the delay. I will look into this.

ArtRand avatar Oct 29 '25 15:10 ArtRand

Hello @blipinskiaima,

Sorry about the delay. The modkit update-tags command isn't as well parallelized as some of the other commands, so it scans through the BAM and updates the MM/ML tags on each record. The --threads argument only changes the number of decompression threads used whilst reading the BAM. Depending on the tags you have, it's likely that parsing, validating, and updating the tags isn't faster than reading the BAM. This means that even though you have more threads available, they aren't being utilized. I think it is reasonable to make a faster version of this function. So to answer your question, yes I think this can be considered normal behavior until I speed up this part of the code.

ArtRand avatar Nov 04 '25 01:11 ArtRand