# Full slicer cache leads to performance problems with MONAILabel

**URL:** <https://discourse.slicer.org/t/full-slicer-cache-leads-to-performance-problems-with-monailabel/23305>\
**Category:** Support\
**Created:** [May 6, 2022, 12:47pm UTC](https://discourse.slicer.org/t/full-slicer-cache-leads-to-performance-problems-with-monailabel/23305 "2022-05-06T12:47:16Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jlvahldiek](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jlvahldiek/32/13507_2.png) [@jlvahldiek](https://discourse.slicer.org/u/jlvahldiek)\
**Post date:** [May 6, 2022, 12:47pm UTC](https://discourse.slicer.org/t/full-slicer-cache-leads-to-performance-problems-with-monailabel/23305/1 "2022-05-06T12:47:16Z")

</div>

We use 3D slicer with MONAILabel to create large data sets. After a certain time the slicer cache fills up. When the upper limit of the cache is reached, loading images via MONAILabel’s ‘Next Sample’ takes a very long time. As soon as the cache is manually cleared again, the performance of Slicer/MONAILabel is back to normal.

I have observed this behavior on various Windows workstations but also on a MacOS workstation. Actually, I would have expected an automatic clearing of the cache. I am not sure if this is a Slicer or a MONAILabel problem.

Is this a known issue? Or is there a corresponding setting option?

---

<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:** [May 6, 2022, 1:54pm UTC](https://discourse.slicer.org/t/full-slicer-cache-leads-to-performance-problems-with-monailabel/23305/2 "2022-05-06T13:54:12Z")

</div>

Thanks for reporting this. To help nail down the issue, you could try running the Activity Monitor on the mac and selecting Slicer and then using the Sample Process option to see where time is being spent during the slowdown.

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [May 6, 2022, 4:12pm UTC](https://discourse.slicer.org/t/full-slicer-cache-leads-to-performance-problems-with-monailabel/23305/3 "2022-05-06T16:12:46Z")

</div>

> [@jlvahldiek](#):
>
> Or is there a corresponding setting option?

I think you can change the location of cache and increase its size (I believe default is only 200MB) from Application Settings.

---

<div class="post-metadata">

**Author:** ![jlvahldiek](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jlvahldiek/32/13507_2.png) [@jlvahldiek](https://discourse.slicer.org/u/jlvahldiek)\
**Post date:** [May 9, 2022, 8:07am UTC](https://discourse.slicer.org/t/full-slicer-cache-leads-to-performance-problems-with-monailabel/23305/4 "2022-05-09T08:07:16Z")

</div>

Thank you for your quick answers. I just installed the latest Slicer Preview version and did some tests for both Windows and Mac. The problem seems to be gone with the latest version. I still had a preview version from early December installed on the workstations affected by the problem…

---

<div class="post-metadata">

**Author:** ![jlvahldiek](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jlvahldiek/32/13507_2.png) [@jlvahldiek](https://discourse.slicer.org/u/jlvahldiek)\
**Post date:** [May 9, 2022, 8:11am UTC](https://discourse.slicer.org/t/full-slicer-cache-leads-to-performance-problems-with-monailabel/23305/5 "2022-05-09T08:11:27Z")

</div>

Is there some automagic for when the slicer cache gets cleared or do you rely on system cleanups?

---

<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:** [May 9, 2022, 1:14pm UTC](https://discourse.slicer.org/t/full-slicer-cache-leads-to-performance-problems-with-monailabel/23305/6 "2022-05-09T13:14:00Z")

</div>

You shouldn’t need to think about the cache under normal circumstances. If it becomes an issue again please report with any details you have about what might have caused the issue.
