mrcrowl/vscode-hg

100% CPU usage when navigating through a file with line annotations enabled

Opened this issue · 0 comments

Tadas commented

Navigating a file by holding down or up arrows causes CPU usage to spike to 100%. When I let go of the key line annotations for skipped lines start appearing in random order. After it settles down, the annotation left showing is not for the line the cursor is on.

Shouldn't this debounce period be longer than 0? Bumping it up to 100 or so seems to have fixed it.

@debounce(0)
async onTextEditorSelectionChanged(
event: TextEditorSelectionChangeEvent
): Promise<void> {