# The speed of import dicom files from directory is very slow. How to solve the problem?

**URL:** <https://discourse.slicer.org/t/the-speed-of-import-dicom-files-from-directory-is-very-slow-how-to-solve-the-problem/8565>\
**Category:** Support\
**Tags:** dicom\
**Created:** [September 25, 2019, 4:08pm UTC](https://discourse.slicer.org/t/the-speed-of-import-dicom-files-from-directory-is-very-slow-how-to-solve-the-problem/8565 "2019-09-25T16:08:31Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tangtangyinghuochong](https://avatars.discourse-cdn.com/v4/letter/t/ec9cab/32.png) [@Tangtangyinghuochong](https://discourse.slicer.org/u/Tangtangyinghuochong)\
**Post date:** [September 25, 2019, 4:08pm UTC](https://discourse.slicer.org/t/the-speed-of-import-dicom-files-from-directory-is-very-slow-how-to-solve-the-problem/8565/1 "2019-09-25T16:08:31Z")

</div>

Hi Dear developers and users.

I am delineating the ROI（Tumor） in abdominal MRIs and then extract the radiomics features for further search.

When import dicom files from directory, I found the speed is very slow. And it spent a lot of time on “updating displayed fields”,which needs more than 2 hrs importing one patient MRI data.

How to solve the problem?

The screen print is below.  
Thanks!!

 ![updating%20displayed%20fields](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/d/5/d533d626b8951b35bf94f7bbb20ecb4eb7c296eb.png)

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [September 25, 2019, 5:38pm UTC](https://discourse.slicer.org/t/the-speed-of-import-dicom-files-from-directory-is-very-slow-how-to-solve-the-problem/8565/2 "2019-09-25T17:38:19Z")

</div>

How many files do you have indexed in the database? You may find that updates are faster if you process one of few patients at a time.

I’m currently working on DICOM browser improvements. I’ll have a look at displayed fields update, probably it can be made faster.

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [September 25, 2019, 6:54pm UTC](https://discourse.slicer.org/t/the-speed-of-import-dicom-files-from-directory-is-very-slow-how-to-solve-the-problem/8565/3 "2019-09-25T18:54:47Z")

</div>

It would be good to profile things - my sense is that the gui is being updated more than needed, but it could also be something in the database indexing.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [September 25, 2019, 7:20pm UTC](https://discourse.slicer.org/t/the-speed-of-import-dicom-files-from-directory-is-very-slow-how-to-solve-the-problem/8565/4 "2019-09-25T19:20:15Z")

</div>

I have already found a couple of issues around indexing (for example, the file system watcher triggered very frequent database view updates) and already fixed them in my branch.

I may do some more profiling with a large DICOM data set before I send the pull request.

---

<div class="post-metadata">

**Author:** ![Tangtangyinghuochong](https://avatars.discourse-cdn.com/v4/letter/t/ec9cab/32.png) [@Tangtangyinghuochong](https://discourse.slicer.org/u/Tangtangyinghuochong)\
**Post date:** [September 26, 2019, 12:51am UTC](https://discourse.slicer.org/t/the-speed-of-import-dicom-files-from-directory-is-very-slow-how-to-solve-the-problem/8565/5 "2019-09-26T00:51:15Z")

</div>

Thanks! I usually add 10 patients data into the database and the database now have more than 150 files.

---

<div class="post-metadata">

**Author:** ![Tangtangyinghuochong](https://avatars.discourse-cdn.com/v4/letter/t/ec9cab/32.png) [@Tangtangyinghuochong](https://discourse.slicer.org/u/Tangtangyinghuochong)\
**Post date:** [September 26, 2019, 12:52am UTC](https://discourse.slicer.org/t/the-speed-of-import-dicom-files-from-directory-is-very-slow-how-to-solve-the-problem/8565/6 "2019-09-26T00:52:24Z")

</div>

Thanks！How to check？Or how to solve？

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [September 26, 2019, 1:07am UTC](https://discourse.slicer.org/t/the-speed-of-import-dicom-files-from-directory-is-very-slow-how-to-solve-the-problem/8565/7 "2019-09-26T01:07:22Z")

</div>

Just wait 1-2 weeks until my updates get into the Slicer Preview Release.
