Code Insights historicalEnqueuer takes a long time (maybe does not complete), takes up CPU usage running Git operations constantly
Created by: arussellsaw
After debugging some high CPU usage bugs from gitserver on my local instance, @mrnugget & i noticed that it seems as though code insights is always reprocessing all frames in an infinite loop. I noticed that i could leave my instance idle for hours or even overnight, and i'd still see high gitserver utilisation. below is copied from PR #19088
it seems like the enqueuer never stops re-enqueueing all frames, eg once a full 52 weeks are processed, it loops back to the beginning and starts again.
you can see this below where 2020 loops back to 2021 and we start processing frames again.
right now this is manifesting as gitserver spawning git log & git rev-list commands in a tight loop permanently, eating a CPU core and spending a lot of time doing GC. I'll also raise this in a separate issue & ref here.
https://user-images.githubusercontent.com/5236823/110919270-f7351300-8313-11eb-8cba-db6d067534ba.mov