Closed amoerie closed 11 months ago
Hi @amoerie,
I have published a nuget beta: https://www.nuget.org/packages/fo-dicom.Codecs/5.10.9-beta1
Use the static field NativeTranscoderManager.MemoryBufferThreshold
for setting the threshold in bytes.
Let me know how it goes.
Thanks @jaime-olivares for the super speedy response! It'll be a while before we can actually test this in production, but the changes look perfect! 🙏
Is your feature request related to a problem? Please describe. In the Fellow Oak 4 codecs (now removed in v5), our company had made custom changes to the codecs. One of these was increasing the default (hardcoded) value of 1 MB, which decides whether to create a TempFileBuffer or a MemoryByteBuffer when encoding a frame.
The reason is that we process nearly more than a million DICOM files per day, and what we see is that our cloud servers have ample memory to spare, but the disk is more of a bottle neck. Most of the disk activity comes from... the temp files of the codecs. By increasing the threshold to 10 MB or even 100 MB, our throughput increases drastically.
Refer to formal documentation This snippet is taken from
DicomJpegLsCodec
:As far as I can see, this kind of code lives in 6 places:![image](https://github.com/Efferent-Health/fo-dicom.Codecs/assets/2063584/57ed28ec-17f4-4d98-9551-4e311c82b81a)
Specifically, I would like the ability for an application to override the default value
1 * 1024 * 1024
A public static option would suffice for me, or maybe a property on NativeTranscoderManager.Provide source code See above