nipy / heudiconv

Flexible DICOM conversion into structured directory layouts
https://heudiconv.readthedocs.io
Other
236 stars 125 forks source link

ENH: set and expose global dicom compresslevel var #669

Closed octomike closed 1 year ago

octomike commented 1 year ago

Python's tarfile is using a compression level of 9 by default (back to and including python 3.5): https://docs.python.org/3/library/tarfile.html#tarfile.open

We see cases where this leads to a large waste of cpu cycles with minimal gain as opposed to compress level 5 or even 1.

Setting a global compresslevel variable makes it easy to override from our heuristics, keeping the default with minimal code impact.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (502bf49) 81.48% compared to head (67d4703) 81.48%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #669 +/- ## ======================================= Coverage 81.48% 81.48% ======================================= Files 41 41 Lines 3899 3900 +1 ======================================= + Hits 3177 3178 +1 Misses 722 722 ``` | [Impacted Files](https://codecov.io/gh/nipy/heudiconv/pull/669?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nipy) | Coverage Δ | | |---|---|---| | [heudiconv/dicoms.py](https://codecov.io/gh/nipy/heudiconv/pull/669?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nipy#diff-aGV1ZGljb252L2RpY29tcy5weQ==) | `86.15% <100.00%> (+0.05%)` | :arrow_up: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

github-actions[bot] commented 1 year ago

:rocket: PR was released in v0.13.0 :rocket: