# Annotator memory leak

**URL:** <https://discuss.roboflow.com/t/annotator-memory-leak/2803>\
**Category:** 🛠️ Feature Reqs\
**Tags:** bugs\
**Created:** [July 30, 2023, 12:24am UTC](https://discuss.roboflow.com/t/annotator-memory-leak/2803 "2023-07-30T00:24:15Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alec\_Jensen](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/alec_jensen/32/1983_2.png) [@Alec\_Jensen](https://discuss.roboflow.com/u/Alec_Jensen)\
**Post date:** [July 30, 2023, 12:24am UTC](https://discuss.roboflow.com/t/annotator-memory-leak/2803/1 "2023-07-30T00:24:15Z")

</div>

_This is copied from [this issue](https://github.com/roboflow/external-bugtracker/issues/15), but I have posted it here as it seems issues reported there are not looked at often_

**Describe the bug**  
After using the annotator with label assist for a while, the memory usage gets very large. The annotator becomes sluggish, eventually freezing altogether.  
As said by [narugo1992](https://github.com/narugo1992), windows does not _crash_. The memory leak still occurs on windows, but the annotator does not slow, freeze, or crash.

**To Reproduce**  
Steps to reproduce the behavior:

1. Open the annotator
2. Enable Label Assist
3. Annotate for a while

**Expected behavior**  
The memory usage stays low, and the annotator does not slow down after time.

**Evidence**

 ![image](https://canada1.discourse-cdn.com/flex029/uploads/roboflow1/original/2X/a/adf53a04a4aeeec7514cf72f0503152d7e3d12ec.png)  
**Desktop (please complete the following information):**

- OS: Fedora 38
- Browser: Google Chrome Version 115.0.5790.110 and Firefox 115.0.2

---

<div class="post-metadata">

**Author:** ![leo](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/leo/32/2228_2.png) [@leo](https://discuss.roboflow.com/u/leo)\
**Post date:** [August 2, 2023, 11:25pm UTC](https://discuss.roboflow.com/t/annotator-memory-leak/2803/3 "2023-08-02T23:25:05Z")

</div>

Hi @Alec_Jensen

Thank you for letting us know! We appreciate it. I’m going to change the category to Feedback and let the team know.

---

<div class="post-metadata">

**Author:** ![Alec\_Jensen](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/alec_jensen/32/1983_2.png) [@Alec\_Jensen](https://discuss.roboflow.com/u/Alec_Jensen)\
**Post date:** [August 2, 2023, 11:49pm UTC](https://discuss.roboflow.com/t/annotator-memory-leak/2803/4 "2023-08-02T23:49:24Z")

</div>

Update: it also crashes on windows, it just seems like windows has a higher memory limit before crashing.

---

<div class="post-metadata">

**Author:** ![henry\_de\_lange](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/henry_de_lange/32/2788_2.png) [@henry\_de\_lange](https://discuss.roboflow.com/u/henry_de_lange)\
**Post date:** [January 9, 2024, 4:35pm UTC](https://discuss.roboflow.com/t/annotator-memory-leak/2803/5 "2024-01-09T16:35:19Z")

</div>

Is this also related to really laggy labelling when there are 100+ labels on an image? (sometimes it takes multiple seconds when I click before it starts drawing a polygon) And is there a fix for this yet?

---

<div class="post-metadata">

**Author:** ![Alec\_Jensen](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/alec_jensen/32/1983_2.png) [@Alec\_Jensen](https://discuss.roboflow.com/u/Alec_Jensen)\
**Post date:** [January 9, 2024, 4:46pm UTC](https://discuss.roboflow.com/t/annotator-memory-leak/2803/6 "2024-01-09T16:46:23Z")

</div>

I don’t know if it’s related. But the problem still isn’t fixed.

---

<div class="post-metadata">

**Author:** ![Alec\_Jensen](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/alec_jensen/32/1983_2.png) [@Alec\_Jensen](https://discuss.roboflow.com/u/Alec_Jensen)\
**Post date:** [January 13, 2024, 4:49am UTC](https://discuss.roboflow.com/t/annotator-memory-leak/2803/7 "2024-01-13T04:49:35Z")

</div>

Hey is there any update? This issue is still happening for me.

---

<div class="post-metadata">

**Author:** ![josephofiowa](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/josephofiowa/32/80_2.png) [@josephofiowa](https://discuss.roboflow.com/u/josephofiowa)\
**Post date:** [June 23, 2024, 7:05pm UTC](https://discuss.roboflow.com/t/annotator-memory-leak/2803/8 "2024-06-23T19:05:22Z")

</div>

Hey, Alec, we’ve been aware of memory leaks — note: some isolated to Linux browsers — and delivered updates for many of them.

Here’s a summary of issues we isolated and pushed fixes for recently:

1. The user’s browser doesn’t properly garbage collect elements so the tooltips that show you how to use the various annotation tools we’re building up in memory over time
2. WebGL contexts weren’t getting released
3. SAM embeddings were being held
4. Ctrl+Z history wasn’t bounded

Our team have been doing extensive memory leak debugging and fixes these last few weeks as well and has been able to verify with the profiler that memory usage no longer grows as you page through and annotate hundreds of images. This includes being able to scroll ~2000 images and not seeing any issues.

There is one known outstanding issue caused by react devtools. Disabling the chrome extension avoids this leak, should that affect you.

Can you confirm if your original message issue still persists for you?
